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>