HTML Practical
HTML Practical
HTML Practical
TECHNOLOGY
THEORY :-
The html <img> tag is used to embed an image in a web page . image are no
technically inserted into a web page ; image are linked to web page . the <img> tag
creates a holding spaces for the referenced image .
The image tag is empty, it contain attributes only , and does not have a closing tag .
A paragraph always starts on a new lines , and browser automatically add some white
space (a margin ) before and after a paragraph.
Html display we cannot be sure how html will be displayed. Large or small screens and
resized window will create different results.
</body>
</html>
OUTPUT :-
Hardware Requirements
Software Requirements
• Visual studio code
• Web Browser
Hardware Requirements
• Intel I5 11TH gen and above processor
• Basic computer components
THEORY:
<font>
The <font> tag in HTML plays an important role in the web page to create an attractive and readable web
page. The font tag is used to change the color, size, and style of a text.
<img>
The <a> tag defines a hyperlink, which is used to link from one page to another.
The most important attribute of the <a> element is the href attribute, which indicates the link's destination.
Source Code:
<html>
<head>
<title>Workgroup</title>
</head>
<body bgcolor="sky blue" alink="blue" vlink="red">
<font face="times new roman" size="12">
Output:
Outcomes:
• Student will learn how to insert image in webpage using img tag.
• Student will learn how to insert hyper link using anchor tag.
To create an ordered list in html , we can use the ‘<OL>’ tag .within the ‘<OL>’tag , we can use the ‘<li>’
Html
<OL>
<li>First item</li>
<li>second item</li>
</OL>
To create an unordered list in html , we can use the ‘<UL>’tag. Within the ‘<UL>’tag ,we can use the ‘<li>’
Html
<UL>
<li>First item</li>
<li>second item</li>
</UL>
</body>
</html>
Output:
• Student will learn how to insert basic structure tag i.e <B>,<I>,<U>,<HR>,<BR>
in webpage.
• Student will learn how to insert heading tags in webpage i.e <H1> to <H6>.
• Student will learn how make paragraph in webpage using <p> tag.
Theory:
<table>
An HTML table consists of one <table> element and one or more <tr>, <th>, and <td> elements.
The <tr> element defines a table row, the <th> element defines a table header, and the <td> element defines
a table cell.
<UL>
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
The list items will be marked with bullets (small black circles) by default:
<OL>
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
Source code:
<!DOCTYPE html>
<html>
<head>
<style>table,th,td {
border: 1px solid black;
border-collapse:collapse ;
}
th {
text-align: left;
}
</style>
</head>
<body>
<table style="width: 70%">
<tr>
<th>name</th>
<th>Age</th>
</body>
</html>
Output:
Theory:
<form>
The HTML <form> element is used to create an HTML form for user input.
The <form> element is a container for different types of input elements, such as: text fields, checkboxes,
radio buttons, submit buttons, etc.
<input>
An <input> element can be displayed in many ways, depending on the type attribute.
<label>
The <label> element is useful for screen-reader users, because the screen-reader will read out loud the label
when the user focuses on the input element.
<checkbox>
he <input type="checkbox"> defines a checkbox.
<submit>
The <input type="submit"> defines a button for submitting the form data to a form-handler.
The form-handler is typically a file on the server with a script for processing input data.
<radio>
Source code:
<html>
<head><title>Pankaj sharma(2237422)</title></head>
<body bgcolor=white>
<h3>
<center>
In this Webpage we create simple form
</center>
Pankaj sharma 2237422
<form><fieldset>
<legend> Personal Detail</legend> <p>
<label> Salutation</label>
<select name ="Salutation">
<option>Name
<option>Mr
<option>Mrs
</select></p>
<p><label > Full name <input name = " First name "></label ></p>
<p><label > Last name <input name = " Last name " ></label ></p>
<p>Gender<br><label>
<input type = "radio" name="Gender" value = "Male" /> Male</label>
<input type = "radio" name="Gender" value = "Female" /> Female</label>
</p>
<p><label> Email :<input type ="email" name = "email" />
</label></p>
<p><label>DOB : <input type ="Date" name = "date of Birth" />
</label></p>
<p><label>
Address : <textarea name="address" cols="30" rows="3" ></textarea>
</label></p>
<p><label >
Choose : Language</label>
<ul style="name">
<li>English<input type="checkbox" name ="language" value="English" />
<li>Hindi<input type="checkbox" name ="language" value="Hindi" />
<li>punjabi<input type="checkbox" name ="language" value="Urdu" />
</ul>
<button type="submit">Submit</button>
<holdset>
</holdset>
</form>
</body>
</html>
Output: