0% found this document useful (0 votes)
18 views2 pages

HTML Programming Basics for Class 8

The document contains a series of HTML program examples for Class 8, demonstrating various HTML structures and functionalities. It includes examples for creating hyperlinks, buttons, images, audio, video, and frames. Each example is accompanied by the corresponding HTML code and styling details.
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)
18 views2 pages

HTML Programming Basics for Class 8

The document contains a series of HTML program examples for Class 8, demonstrating various HTML structures and functionalities. It includes examples for creating hyperlinks, buttons, images, audio, video, and frames. Each example is accompanied by the corresponding HTML code and styling details.
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

Class 8

HTML Programs
1. Structure of Html script.
<html>
<head>
<title>
my first html script
</title>
</head>
<body>
Thought of the day
</body>
</html>
2. Create hyperlink.
<html>
<head>
<title>hyperlink</title>
<style type="text/css">
body{background-color:coral}
</style>
</head>
<body>
<h1>Hello world</h1>
<a href="[Link] here</a>
</body>
</html>
3. To create hyperlink with it’s states.
<html>
<head>
<title>hyperlink</title>
<style type="text/css">
body{background-color:coral}
a:link{color:red}
a:visited{color:yellow}
a:hover{color:purple}
a:active{color:green}
</style>
</head>
<body>
<h1>Hello world</h1>
<a href="[Link] here</a>
</body>
</html>
4. Create link as button
<html>
<head>
<title>
Using button (Inline onclick Event)
</title>
<style>
button{background-color: green;border: 2px solid black;color:white;}
</style>
</head>
<body>
<a href="[Link] me</button></a>
</body>
</html>
5. Create a link as image.
<html>
<head>
<title>Using image</title>
<style>
body{ background-color: khaki;}
</style>
</head>
<body>
<a href="[Link] src="D:/Aster/[Link]">
</a>
</body>
</html>
6. To add audio and video
<html>
<head>
<title>Using Audio and Video</title>
<style>
body{background-color:coral}
</style>
</head>
<body>
<audio controls src="D:/Aster/[Link]"></audio>
<video controls src="D:/Aster/Songs.mp4"></video>
</body>
</html>
7. To create frames ([Link])
<html>
<head>
<title>Using frames</title>
<style type="text/css">
body{background-color:khaki}
iframe{border:8px solid green}
</style>
</head>
<body>
<iframe src="[Link]" height=500 width=500></iframe>
<iframe src="[Link]" height=500 width=500 style="border:8px dotted
red"></iframe>
</body>
</html>

You might also like