Professional Documents
Culture Documents
BUDHLADA
SESSION:2023-24
PRACTICAL FILE
WEB DESIGNING
HTML TAG
The <html> tag is the container for all other HTML elements (except for the <!DOCTYPE> tag).
Create Html Page
You can create your first HTML page by the following steps:
In this step, we have to open any text editor such as Notepad or Notepad++ for writing an HTML code. The
following image is the screenshot of the text editor (notepad++) for writing the HTML code.
Step 2: Type the HTML code.
In this step, we have to type the HTML code in the text editor. The HTML code is composed of various tags
and always begins with the opening tag of HTML and complete with the closing tag of HTML.
The following block describes the syntax for creating any HTML page:
1. <HTML>
2. <HEAD>
3. <!-- The Head tag is used to create a title of web page, CSS syntax for a web page, and helps in writt
en a JavaScript code. -->
4. </HEAD>
5. <BODY>
6. <!-- The Body tag is used to display the content on a web page, which is specified between the body
tag. -->
7. </BODY>
8. </HTML> <!-- It is the opening tag of any HTML -->
In the above syntax, some important tags or elements are used, which are given below:
<HEAD>: The Head tag is used to create a title of the web page, CSS syntax for a web page, and helps in
written a JavaScript code The <head> must be closed before the opening of <body> tag.
<BODY>: The Body tag is used to display the content or text on a web page, which is specified between the
body tag.-->
After typing the complete HTML code, we have to save that file in a folder with .html extension. We can
easily save the html file by clicking on the File menu and then click on Save As option. After that, type the
file name with .html extension. The following screenshot describes how we save the above html code in a
text editor.
Step 4: Run the HTML file.
At the last step, we have to execute or run an HTML file from the location where we saved the file. The file
will run on a default browser. Consider the below output:
HTML PAGE STRUCTURE
Below is a visualization of an HTML page structure:
<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph. < /p>
<p>This is another paragraph. < /p>
</body>
</html>
Note: The content inside the <body> section will be displayed in a browser. The content inside the <title>
element will be shown in the browser's title bar or in the page's tab.
<html> </html> :
<html> is a root element of html. It’s a biggest and main element in complete html language, all the tags ,
elements and attributes enclosed in it or we can say wrap int , which is used to structure a web page. <html>
tag is parent tag of <head> and <body> tag , other tags enclosed within <head > and <body>.
<head>:
Head tag contains metadata, title, page CSS etc. Data stored in the <head> tag is not displayed to the user,
it is just written for reference purposes and as a watermark of the owner.
<body>:
A body tag is used to enclose all the data which a web page has from texts to links. All the content that you
see rendered in the browser is contained within this element. Following tags and elements used in the body.
1. <h1 > , <h2> ,<h3> to <h6>
2. <p>
3. <div> and <span>
4. <form>
5. <label> and <input> others……….
OUTPUT:
2.Create a web page using font tag and its attributes.
The <font> tag was used to specify the font face, font size, and color of text.
<html>
<body>
<p style="color:black">HTML</p>
</body>
</html>
<html>
<body>
<p style="candara">HTML</p>
<p style="font-family:’times new roman’'">Hyper Text Markup
Language.</p>
</body>
</html>
<html>
<body>
<p style="font-size:30px">HTML</p>
<p style="font-size:11px">Hyper Text Markup Language</p>
</body>
</html>
OUTPUT:
3.Create a web page using anchor tag.
Syntax:
<a href = "link"> Link Name </a>
Example:
<html>
<body>
<h1>The anchor element</h1>
<a href="https://www.google.com/">google</a>
</body>
</html>
Image as a link
<html>
<body>
<a href="https://www.google.com/">
<img src="C:\Users\Sunil Kumar\OneDrive\Desktop\IMAGES\
google.png" alt="google logo" width="200" height="200"
border="1px solid black">
</a>
</body>
</html>
OUTPUT:
4. Create a web page to include image using HTML tag.
<html>
<body>
<h2>HTML Image</h2>
</body>
</html>
OUTPUT:
5.Create a web page using list tag of HTML.
1. <ol> tag
<html>
<body>
<ol type='a'>
<li>mango</li>
<li>grapes</li>
<li>kiwi</li>
</ol>
</body>
</html>
2. <ul> tag
<html>
<body>
<ul>
<li>mango</li>
<li>grapes</li>
<li>kiwi</li>
</ul>
</body>
</html>
OUTPUT:
6. Create a Web page of nested list using <ol> and <ul> tag.
<html>
<body>
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
</body>
</html>
<html>
<body>
<ol>
<li>Coffee</li>
<li>Tea
<ol type="a">
<li>Black tea</li>
<li>Green tea</li>
</ol>
</li>
<li>Milk</li>
</ol>
</body>
</html>
OUTPUT:
7. Create a Web page using table tag of HTML.
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
</style>
</head>
<body>
<table>
<tr>
<th>NAME</th>
<th>CONTACT NO.</th>
</tr>
<tr>
<td>KRITIKA</td>
<td>9876435665</td>
</tr>
<tr>
<td>ABHISHEK</td>
<td>9944876538</td>
</tr>
</table>
</body>
</HTML>
OUTPUT:
8.Create a web page using rowspan and colspan.
COLSPAN ROWSPAN
<html> <html>
<head> <head>
<style>
<style>
table,th,td{
table, th, td {
border:2px solid black;
border: 1px solid black;
border-collapse:collapse;
} border-collapse: collapse;
</style> }
</style>
<body> </head>
<table>
<body>
<tr>
<table>
<th colspan="2">Name</th>
<th>Age</th> <tr>
</tr> <th>Name</th>
<tr> <td>Jill</td>
<td>James</td> </tr>
<td>Mill</td>
<tr>
<td>43</td>
<th rowspan="2">Phone</th>
</tr>
<td>555-1234</td>
<tr>
<td>Eve</td> </tr>
<td>Jackson</td> <tr>
<td>57</td> <td>555-8745</td>
</tr> </tr>
</table>
</table>
</body>
</body>
</head>
OUTPUT:
9. Create a web page which defined all text formatting tags of html in
tabular format.
<html>
<head>
<body>
<h1>Formatting tags</h1>
</body>
</head>
</body>
OUTPUT:
10. Create a Web Page with background image using CSS.
<html>
<head>
<style>
body {
background-image:url(".\bgcomp.jpg");
background-size:100% 100%;
background-repeat:no-repeat;
}
</style>
</head>
<body>
<p>This page has an image as the background!</p>
</body>
</html>
OUTPUT:
11. Create a Web Page using Button tag.
<html>
<head>
<style>
.button {
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
</body>
</html>
OUTPUT:
12. Create employ registration web page using HTML form objects.
<html> </tr>
<head> <tr>
<meta name="viewport" <td><input type="text" name=""></td>
content="width=device-width, initial-scale=1.0">
<td> <input type="text" name=""></td>
</head>
</tr>
<style>
<tr>
table{
<td>Gender</td>
border-top: 8px solid grey;
<td>Address</td>
border-left: 8px solid grey ;
</tr>
<tr>
<td><input type="number"
<td><input type="number" name=""></td>
<td>
</td>
</tr>
<td>
Profile Photo :
</td>
</tr>
<tr>
<td>Email</td>
<td>Password </td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<div class="butt">
</div>
</form>
</body>
</html>
OUTPUT:
13.Create a Web Page using frame tag using it's attributes.
<html>
<head>
<title>Frame tag</title>
</head>
<frameset cols="25%,50%,25%">
</frameset>
</html>
OUTPUT:
14.Introduction of style sheet. (CSS)
1.Inline CSS 2.External CSS
1. Inline css
<html>
<body>
<h1 style="color:blue;">A
Blue Heading</h1>
<p style="color:red;">A red
paragraph.</p>
</body>
2.External css
Style.css
<html>
<head> .h1{
<link rel="stylesheet" href="styles.css"> color:blue;
</head> }
<body> .p{
<h1>This is a heading</h1> color:red;
<p>This is a paragraph.</p> }
</body>
</html>
OUTPUT:
15.CREATE A WEB PAGE USING IMAGE MAPPING.
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>image mapping</title>
</head>
<body>
<img src="../insta.jpg" alt="" usemap="#kashi">
<map name="kashi">
<area shape="poly" coords="143,3,254,23,233,103,187,164,78,108,128,68" href="" alt="">
</map>
</body>
</html>