You are on page 1of 11

HTML

Hypertext Markup Language. This is the most commonly


used language to write web pages for the World Wide Web.

1. Easy to understand and modify as it does not require


any programming language.
2. It provides flexible way to design web pages using text.
3. Links can be added to the web pages so as to help the
reader to visit other web pages.
4. Graphics, videos, sounds etc. can be added to the web
page which gives an attractive look to the document.
5. HTML document can be displayed on any platform such
as windows, Linux, Mac etc. It is a platform independent
language.
6. It is NOT case sensitive.
7. It offers compatibility with all web browsers .

HTML Tag – The HTML Tags are containers for all the HTML
elements .
CODE 1

<html>

<head>

<title>This is my first webpage</title>

</head>

<body>

<h1>this is first heading.</h1>

<p>Hello World!</p>

</body>

</html>
CODE 2

<html>

<head>

<title>Title</title>

</head>

<body>

<h1>this is first heading</h1>

<h2>this is second heading</h2>

<h3>this is third heading</h3>

<h4>this is fourth heading</h4>

<h5>this is fifth heading</h5>

<h6>this is sixth heading</h6>

<h7>this is first heading</h7>

</body>

</html>
CODE 3

<html>

<head>

<title>To insert link</title>

</head>

<body>

<a href=”https://www.youtube.com”>this is a hyperlink</a>

</body>

</html>

CODE 4

<html>

<head>

<title>STYLES</title>
</head>

<body style="background-color: blue">

<h1>This is heading</h1>

<p>This is paragraph</p>

<h1 style="background-color: yellow">This is heading</h1>

<p style="background-color: red">This is paragraph</p>

<h1 style="color: green">This is heading</h1>

<p style="color: orange">This is paragraph</p>

<h1 style="font-family:verdana">This is heading</h1>

<p style="font-family: courier">This is paragraph</p>

<h1 style="font-size: 300%">This is heading</h1>

<p style="font-size: 300%">This is paragraph</p>

<h1 style="text-align: center">This is heading</h1>

<p style="text-align: right">This is paragraph</p>

</body>

</html>

CODE 5
<html>

<head>

<title>Text Formatting</title>

</head>
<body>

<p> This is a normal line</p>

<p><b> This line is bold formatted</b></p>

<p><i> This line uses italic formatting</i></p>

<p><strong> This line uses strong data</strong></p>

<p><small> This line is small in size</small></p>

<p><em> This line has emphasized text</em></p>

<p> This is normal <del>line</del></p>

<p> This is normal <del>line</del><ins>paragraph</ins></p>

<p> This is a normal <mark>line</mark></p>

<p> This is a normal <sup>line</sup></p>

<p> This is a normal <sub>line</sub></p>

</body>

</html>

CODE 6

<html>

<head><title>Adding image to webpage

</title></head>
<body>

<img src="car.jpg"width="100%"height="100%">

</body>

</html>

CODE 7
<html>

<head>

<title>Adding colours </title>

</head>

<body>

<h1 style="background-color:orange;">HELLO WORLD</h1>


<h1 style="background-color:grey;">HELLO WORLD</h1>

<h1 style="background-color: green;">HELLO WORLD</h1>

<h1 style="background-color:red;">HELLO WORLD</h1>

<h1 style="background-color:blue;">HELLO WORLD</h1>

<h1 style="background-color:violet;">HELLO WORLD</h1>

<h1 style="background-color:yellow;">HELLO WORLD</h1>

<h1 style="color:orange;">HELLO WORLD</h1>

<h1 style="color:grey;">HELLO WORLD</h1>

<h1 style="color:green;">HELLO WORLD</h1>

<h1 style="color:red;">HELLO WORLD</h1>

<h1 style="color:blue;">HELLO WORLD</h1>

<h1 style="color:violet;">HELLO WORLD</h1>

<h1 style="color:yellow;">HELLO WORLD</h1>

<h1 style="border:2px solid orange;">HELLO WORLD</h1>

<h1 style="border:2px solid grey;">HELLO WORLD</h1>

<h1 style="border:2px solid green;">HELLO WORLD</h1>

<h1 style="border:2px solid red;">HELLO WORLD</h1>

<h1 style="border:2px solid blue;">HELLO WORLD</h1>

<h1 style="border:2px solid violet;">HELLO WORLD</h1>

<h1 style="border:2px solid yellow;">HELLO WORLD</h1>

</body>

</html>

CODE 8
<html>

<head>

<title>Creating Table</title>

</head>

<body>

<table>
<tr>

<th>First Name</th>

<th>Last Name</th>

<th>Age</th>

</tr>

<tr>

<th>Khushij</th>

<th>sharma</th>

<th>20</th>

</tr>

<tr>

<th>sahil</th>

<th>sharma</th>

<th>27</th>

</tr>

<tr>

<th>dhruv </th>

<th>sharma</th>

<th>19</th>

</tr>

</body>

</html>

CODE 9
<html>

<head>

<title>HTML Lists</title>

</head>
<body>

<h1> Ordered List</h1>

<ol>

<li>Kshitij Maan</li>

<li>Hemang Awasthi</li>

<li>Khushi Sharma</li>

<li>Rohit Choudhary</li>

<li>Ishita Agarwal</li>

<li>Yash Goyal</li>

</ol>

<h1> Unordered List</h1>

<ul>

<li>Kshitij Maan</li>

<li>Hemang Awasthi</li>

<li>Khushi Sharma</li>

<li>Rohit Choudhary</li>

<li>Ishita Agarwal</li>

<li>Yash Goyal</li>

</ul>

<h1> Description List</h1>

<dl>

<dt>Kshitij Maan</dt>

<dd> He likes volleyball</dd>

<dt>Hemang Awasthi</dt>

<dd> He likes football</dd>

<dt>Khushi Sharma</dt>

<dd> She likes novels</dd>

<dt>Rohit Choudhary</dt>
<dd> He likes video games</dd>

<dt>Ishita Agarwal</dt>

<dd> She is short</dd>

<dt>Yash Goyal</dt>

<dd> He is very talkative</dd>

</dl>

</body>

</html>

You might also like