Practical_file_of_web_develment
Practical_file_of_web_develment
Practical_file_of_web_develment
webpage.
Ans:
<!DOCTYPE html>
<html>
<title>Practical</title>
<head>
</head>
<body>
Hello World
</body>
</html>
Output:
Hello World
Que 2: Demonstrate the use of different heading tags.
Ans:
<!DOCTYPE html>
<html>
<title> Practical</title>
<head>
</head>
<body>
<h1> This is my first web page.</h1>
<h2> This is my first web page.</h2>
<h3> This is my first web page.</h3>
<h4> This is my first web page.</h4>
<h5> This is my first web page.</h5>
<h6> This is my first web page.</h6>
</body>
</html>
Output:
<html>
<title> Practical</title>
<head>
</head>
<body>
</body>
</html>
Output:
Hey, I am a paragraph
Que 4: Display an ordered list and unordered list.
Ans:
<!DOCTYPE html>
<html>
<title>Practical</title>
<head>
</head>
<body>
<ol>
</ol>
<ul>
</ul>
</body>
</html>
Output:
Fruits Name
Ordered list
1. Mango
2. Orange
3. Apple
Unordered list
• Mango
• Orange
• Apple
Que 5: Create a hyperlink to another webpage.
Ans:
<!DOCTYPE html>
<html>
<title>Practical</title>
<head>
</head>
<body>
<h1>Hyperlink</h1>
</body>
</html>
Output:
Hyperlink
Whatsapp
Que 6: Display an image on the webpage.
Ans:
<!DOCTYPE html>
<html>
<title>Practical</title>
<head>
</head>
<body>
<img src="https://media.webdunia.com/_media/hi/img/article/2020-
12/07/full/1607311219-0037.jpg" width="700" height ="500">
</body>
</html>
Output:
<html>
<body>
<form>
</form>
</html>
Output:
Last name:
Also note that the default width of text input fields is 20 characters.
Que 8: Display a basic HTML table.
Ans:
<!DOCTYPE html>
<html>
<style>
table, th, td {
</style>
<body>
<table style="width:100%">
<tr>
<th>Name</th>
<th>Class</th>
<th>Marks</th>
</tr>
<tr>
<td>Ram</td>
<td>12th</td>
<td>89%</td>
</tr>
<tr>
<td>Mohan</td>
<td>12th</td>
<td>90%</td>
</tr>
</table>
</body>
</html>
Output:
<html>
<head>
<style>
.myDiv {
background-color: lightblue;
text-align: center;
</style>
</head>
<body>
<div class="myDiv">
</div>
</body>
</html>
Output:
<!DOCTYPE html>
<html>
<head>
<style>
.myDiv {
background-color: lightblue;
text-align: center;
width:300px;
</style>
</head>
<body>
<div class="myDiv">
</div>
</body>
</html>
Output:
<html>
<body>
<p>This is a paragraph.</p>
</body>
</html>
Output:
This is a paragraph.
Que 11: Embed an audio file in your website.
Ans:
<!DOCTYPE html>
<html>
<body>
<audio controls>
</audio>
</body>
</html>
Que 12: Use different types of ordered lists.
Ans:
<!DOCTYPE html>
<html>
<body>
<ol type="1">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol type="A">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol type="a">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol type="I">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ol type="i">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Output:
a. Coffee
b. Tea
c. Milk
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
CSS Code:
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
Output:
This is a heading
This is a paragraph.
Que 14: Embed another webpage using an iframe.
Ans:
<!DOCTYPE html>
<html lang="en">
<head>
<style>
iframe {
width: 100%;
height: 500px;
</style>
</head>
<body>
<iframe src="/examples/html/hello.html"
name="myFrame"></iframe>
<p><a href="https://www.tutorialrepublic.com"
target="myFrame">Open TutorialRepublic.com</a></p>
</body>
</html>
Output:
Hello World
This HTML document is embedded inside the current document using an iframe.
https://www.tutorialrepublic.com/
Que 15: Program that uses essential HTML tags to create a
simple webpage.
Ans:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
Output:
My First Heading
My first paragraph