0% found this document useful (0 votes)
65 views21 pages

HTML Practical Exercises and Examples

Uploaded by

rs3666539
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views21 pages

HTML Practical Exercises and Examples

Uploaded by

rs3666539
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Practical-1

HTML code using Heading Tag:


<html>
<head>
<title> Heading tag </title>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>
Output:
Practical-2
HTML Program using Bold, Italic and underline tag:
<html>
<head>
<title> Bold ,Italics and Underline tag</title>
</head>
<body>
<b> This is in Bold</b> <br>
<i> This is in Italics </i> <br>
<u>This is displayed with underline</u> <br>
</body>
</html>
Output:
Practical-3
Paragraph tag using in html program:
<html>
<head>
<title> Paragraph tag</title>
</head>
<body>
<p> This is a Paragraph. </p>
<p> This is another Paragraph. </p>
</body>
</html>
Output:
Practical-4
Create an ordered list in html:
<html>
<head>
<title> Ordered List</title>
</head>
<body>
<ol type=”a”>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Output:
Practical-5
Create an Unordered list in html:
<html>
<head>
<title> Unordered List</title>
</head>
<body>
<ul type=”disc”>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>
Output:
Practical-6
Create hyperlink in html:
<html>
<head>
<title> HTML Hyperlink</title>
</head>
<body>
<a href=”[Link]
</body>
</html>
Practical-7
HTML code for Insert Image:
<html>
<head>
<title> Insert Image</title>
</head>
<body>
<img src="C:/Users/Downloads /Computer
BSA/[Link]"></img>
</body>
</html>
Practical-8
Html code for insert background image:
<html>
<head>
<title> Background Image</title>
</head>
<body
background=”C:/Users/Document/Pictures/Image3.
jpg”>
<h1>Background Image</h1>
</body>
</html>
Practical-9
Html code for subscript and superscript:
<html>
<head>
<title> Example of Subscript & Super Script</title>
</head>
<body>
<h1> Chemical Formula of Water:
H<sub>2</sub>SO<sub>4</sub></h1>

<h1> Mathematical Formula: (A+B)<sup>2</sup>= A


<sup>2</sup>+ B<sup>2</sup> + 2AB</h1>
</body>
</html>
Practical-10
Create table in html with border:

<html>
<head></head>
<body>
<h2>Table With Border</h2>

<table border=1>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Aman</td>
<td>Kumar</td>
<td>50</td>
</tr>
<tr>
<td>Shivam</td>
<td>Singh</td>
<td>94</td>
</tr>
<tr>
<td>Shiv</td>
<td>Kumar</td>
<td>80</td>
</tr>
</table>

</body>
</html>
Practical-11
HTML Code to insert Audio.
<html>
<head>
<title> Insert Audio</title>
</head>
<body>
<audio controls src="horse.mp3">
</audio>
</body>
</html>
Practical-12
HTML Code to insert Video.
<html>
<head>
<title> Insert Video</title>
</head>
<body>
<video width="320" height="240">
<source src="movie.mp4" type="video/mp4">
</video>
</body>
</html>
Practical-13
HTML Code to Login Form.
<html>
<head>
<title> Login Form</title>
</head>
<body>
<form>
User Name: <br>
<input type=”text” name=”username”></input>
<br>
Password:
<input type=”password”
name=”Password”></input> <br>
<input type=”Submit” value=”Login”></input>
<input type=”Reset” value=”Reset”></input>
</form>
</body>
</html>

You might also like