HTML
HTML
What is HTML?
HTML Features
HTML skeleton
Elements and Attributes
HTML indentation
HTML comments
HTML Heading
HTML Paragraph
HTML formatting
Quotation and citation
HTML Links
HTML Images
HTML Lists
HTML Table
HTML Div and Span
HTML audio
HTML video
HTML Embed
HTML Media
HTML Entities
HTML Image maps
Tags and their attributes and uses
HTML form and input types
HTML select
HTML Datalist
HTML label, fieldset, legends
HTML SEO Tags
HTML Favicon
What is HTML?
stands for Hyper Text Markup Language
Notes 1
Markup Language: Text between tags which defines structure.
HTML defines how the web page looks and how to display content with the help
of elements.
HTML Features
the learning curve is very easy (easy to modify).
HTML skeleton
<!DOCTYPE html>
<html>
<head>
<title> </title>
</head>
<body>
</body>
</html>
HTML indentation
Notes 2
HTML comments
comments are written to make the code understandable.
HTML Heading
there are 6 heading tags.
<!DOCTYPE html>
<html>
<head>
<title> Heading in HTML </title>
</head>
<body>
<h1> Heading 1 </h1>
<h2> Heading 2 </h2>
<h3> Heading 3 </h3>
<h4> Heading 4 </h4>
<h5> Heading 5 </h5>
<h6> Heading 6 </h6>
</body>
</html>
HTML Paragraph
We need paragraph to write our content.
paragraph element takes whole width of the line or block i.e. something written
after paragraph element will start at next line.
<!DOCTYPE html>
<html>
<head>
<title> Paragraph in HTML </title>
</head>
<body>
<p> This is a paragraph 1.</p>
Notes 3
<p> This is a paragraph 2.</p>
This is a normal text in HTML having no tag,no elemen
</body>
</html>
HTML formatting
bold
italic
underline
strong
emphasize
small
delete
inserted text
subscript
superscript
mark
marquee
<!DOCTYPE html>
<html>
<head>
<title> Formatting in HTML </title>
</head>
<body>
<pre> pre tag is used to show content as it is writte
as here it will start from next line
</pre>
<p> if you are writing poem you need to start a new li
<p> roses are red <br>
violets are blue <br>
whenever I close my eyes <br>
I see you
Notes 4
</p>
<p> <b> This is a text which is bold. </b> </p>
<p> <i> This is a text with Italic style.</i> </p>
<p> <u> This is a text which has underline.</u> </p>
<p> This is text which has <strong> strong tag </stro
<p> <em> This text has used Emphasis tag which gives
<p> The tag used here is inserted text which shows whi
<p> this is <del> deleted text </del> where del tag i
<p> Here we are using Subscript tag to write base 2. H
<p> Here we are using superscript tag to write power 2
<p><marquee> this is a marquee tag. mostly used in new
</body>
</html>
cite
quote
address
abbreviation
<!DOCTYPE html>
<html>
<head>
<title> Quotation and Citation in HTML. </title>
</head>
<body>
<p> Quotation tag is used to write quotes.</p>
<p> <q> This is wholesome quote.</q></p>
<blockquote cite="google.com"> this is blockquote whic
<p> cite tag is used to write some author,book or any
<p> <address> address tag helps you to write your add
<p> abbr tag is for abbreviation for eg: <abbr title=
</body>
</html>
Notes 5
HTML Links
anchor
email link
<!DOCTYPE html>
<html>
<head>
<title> Links in HTML </title>
</head>
<body>
<p> Anchor tag is used to link pages. In anchor tag we
<a href="google.com">click here to go to google home
<a href="google.com" target="_blank">click this to goo
<p> we can also make email link with anchor tag.</p>
click on <a href="mailto:[email protected]?s
</body>
</html>
HTML Images
<!DOCTYPE html>
<html>
<head>
<title> Image in HTML. </title>
</head>
<body>
<img src="car.jpg" width="500" height="300" alt="Red c
<img src="cake.jpg" width="500" height="300" alt="Red
</body>
</html>
HTML Lists
ordered lists
Notes 6
<!DOCTYPE html>
<html>
<head>
<title> Ordered List in HTML </title>
</head>
<body>
<p> We are going to make ordered list. </p>
<ol>
<li> A to Z </li>
<li> 1 to 10 </li>
</ol>
<ol type="A">
<li> A to Z </li>
<li> 1 to 10 </li>
</ol>
<ol type="a">
<li> A to Z </li>
<li> 1 to 10 </li>
</ol>
<ol type="I">
<li> A to Z </li>
<li> 1 to 10 </li>
</ol>
<ol type="i">
<li> A to Z </li>
<li> 1 to 10 </li>
</ol>
<ol start="4">
Notes 7
<li> A to Z </li>
<li> 1 to 10 </li>
</ol>
<ol>
<li> A to Z </li>
<ol type="A">
<li> Apple </li>
<li> Ball </li>
<li> Cat </li> <br>
. <br>
. <br>
. <br>
. <br>
<li> Zebra </li>
</ol>
<li> 1 to 10 </li>
<ol type="i">
<li> 1 </li>
<li> 2 </li>
<li> 3 </li>
. <br>
. <br>
. <br>
. <br>
<li> 10 </li>
</ol>
</ol>
</body>
</html>
unordered lists
<!DOCTYPE html>
<html>
<head>
Notes 8
<title> Unordered list in HTML.</title>
</head>
<body>
<p> We are going to make unordered list </p>
<ul>
<li> drinks </li>
<li> meals </li>
<li> Special </li>
<li> Chinese </li>
</ul>
<ul>
<li> Drinks </li>
<ul>
<li> Coffee </li>
<li> Green tea </li>
<li> chocolate </li>
<ul>
<li> Hot chocolate drink </li>
<li> Chocolate milk shake</li>
</ul>
</ul>
<li> Meals </li>
<ul>
<li> Chicken legs </li>
<li> Chicken Biryani </li>
<li> Butten chicken </li>
</ul>
<li> Special </li>
<ul>
<li> Family special meal non veg </li>
<li> special veg meal </li>
<li> Handi </li>
</ul>
<li> Chinese </li>
<ul>
Notes 9
<li> Soup </li>
<li> Fried rice </li>
<ul>
<li> Non veg </li>
<li> Veg </li>
<li> Triple fried rice</li>
</ul>
<li> Noodles </li>
<ul>
<li> Hakka noodles </li>
<li> Normal noodles </li>
</ul>
<li> Manchurian</li>
</ul>
</ul>
</body>
</html>
nested lists
<!DOCTYPE html>
<html>
<head>
<title> Nested List in HTML </title>
</head>
<body>
<ol>
<li> IT </li>
<ul>
<li> Web development </li>
<ul>
<li> Front end developer </li>
<li> Back end developer </li>
<li> Full stack developer </li>
</ul>
<li> Software related </li>
<ol>
<li> Software Engineer </li>
Notes 10
<li> Software developer </li>
<li> Software designer </li>
<li> Software tester </li>
</ol>
<li> Database related </li>
<ul>
<li> Database administrator </li>
<li> Data Scientist </li>
<li> Data analyst </li>
<li> Database manager </li>
</ul>
<li> Techonolies </li>
<ol>
<li> Database </li>
<li> AI/ML </li>
<li> BlockChain </li>
<li> IoT </li>
<li> Programming Languages </li>
<li> Development </li>
<li> GIT and GitHub </li>
<li> Edge computing </li>
<li> Quantum computing </li>
<li> Robotics and Automation </li>
<li> Web 3.0 </li>
<li> CyberSecurity </li>
<li> Extended Reality </li>
<li> 5G / WIFI 6 </li>
<li> AI and AI as a service </li>
<li> Biotechnology </li>
</ol>
</ul>
</ol>
</body>
</html>
description
Notes 11
<!DOCTYPE html>
<html>
<head>
<title> Description in HTML </title>
</head>
<body>
<h2> Description Topic </h2>
<dl>
<dd>
<dd> This is a description 1. </dd>
<dd> This is a description 2.</dd>
<dd> This is a description 3.</dd>
<dd> This is a description 4.</dd>
</dd>
</dl>
</body>
</html>
HTML Table
row
column
heading
title
<!DOCTYPE html>
<html>
<head>
<title> Table in HTML </title>
</head>
<body>
<caption> A Table</caption>
<table border="3">
<tr>
<th> column 1 </th>
<th> column 2 </th>
Notes 12
<th> column 3 </th>
</tr>
<tr>
nested table
<!DOCTYPE html>
<html>
<head>
<title> Nested Table in HTML </title>
</head>
<body>
<caption> Nested Table </caption>
<table border="3">
<tr>
<th> Row 1 </th>
<td> one </td>
Notes 13
</tr>
<tr>
<th> Row 2 </th>
<td>
<table border="3">
<tr>
<td> two </td>
<td> three </td>
<td> four </td>
</tr>
<tr>
<td> six </td>
<td> seven </td>
<td> eight </td>
</tr>
</table>
</td>
</tr>
<tr>
<th> Row 3 </th>
<td> five </td>
</tr>
</table>
</body>
</html>
span: inline element that takes the width that is needed and starts from where
the previous element is ended.
<!DOCTYPE html>
<html>
<head>
<title> Div and Span in HTML </title>
</head>
<body>
Notes 14
<p> Div takes whole width of the block i.e. the conte
<div>
this is div element.
</div>
this is a normal text with no element.
<p> Span element takes width required to it. The next
<span> This is a span element. </span>
this is a normal text with no element.
</body>
</html>
HTML audio
HTML video
HTML Embed
HTML Media
<!DOCTYPE html>
<html>
<head>
<title> Media in HTML</title>
</head>
<body>
<p> Audio in HTML.</p>
<audio controls src="Audio.mp3" type="mp3"></audio>
<hr />
<p> Video in HTML. </p>
<video controls src="video.mp4" type="mpeg"></video>
<hr>
<p> We embed some websites or media for various reaso
<p> we can use embed tag or iframe tag.</p>
<iframe width="560" height="315" src="https://www.you
<embed src="sample.pdf" type="application/pdf" width=
Notes 15
</body>
</html>
HTML Entities
<map name="image-map">
<area target="_blank" alt="Oval Goggles" title="Ov
<area target="_blank" alt="Tea set" title="Tea se
<area target="_blank" alt="Mobile phones" title="M
<area target="_blank" alt="Laptop" title="Laptop"
<area target="_blank" alt="Laptop" title="Laptop"
</map>
</body>
</html>
Notes 16
<form action="" method="">
Enter Name: <input type="text" placeholder="Full
<hr>
Enter Age: <input type="number"> <br>
<hr>
Enter Date Of Birth: <input type="date"> <br>
<hr>
Enter Time: <input type="time" placeholder="Curre
<hr>
Enter Color: <input type="color" placeholder="Favo
<hr>
Enter Email: <input type="Email"> <br>
<hr>
Enter Range: <input type="range" > <br>
<hr>
Enter URL: <input type="url"> <br>
<hr>
Enter File: <input type="file"> <br>
<hr>
Enter Password: <input type="password">
<hr>
<input type="submit" value="Submit">
<input type="reset" name="" id="" value="Reset">
</form>
</body>
</html>
HTML select
<!DOCTYPE html>
<html>
<head>
<title> Select in HTML. </title>
</head>
<body>
<select name="cars and sports" id="">
Notes 17
<optgroup label="cars">
<option value="BMW">BMW</option>
<option value="Ferrari">Ferrari</option>
<option value="Porsche">Porsche</option>
<option value="Nissan">Nissan</option>
<option value="Toyota">Toyota</option>
<option value="Tata" selected>Tata</option>
</optgroup>
<optgroup label="Sports">
<option value="BMW">Cricket</option>
<option value="Ferrari">Football</option>
<option value="Porsche">Tennis</option>
<option value="Nissan">Hockey</option>
<option value="Toyota">Running</option>
<option value="Tata" selected>Baseball</optio
</optgroup>
</select>
</body>
</html>
HTML Datalist
<!DOCTYPE html>
<html>
<head>
<title> Datalist in HTML. </title>
</head>
<body>
Search <input type="text" name="" id="" list="List">
<datalist id="List">
<option value="Apple"> </option>
<option value="Mango"> </option>
<option value="Car"> </option>
<option value="Orange"> </option>
</datalist>
<input type="button" value="search">
Notes 18
</body>
</html>
meta description
HTML Favicon
Notes 19
Tags Attributes Use
href=”path”, target=”_blank”,
<a> </a> anchor tag
title=””, href=”mailto:”
Notes 20
Tags Attributes Use
<thead> </thead>
<tbody> </tbody>
<tfoot> </tfoot>
Notes 21
Tags Attributes Use
step=””, autofocus,
autocomplete, name
rows=””, cols=””,
<textarea> </textarea> description box
placeholder=””
<datalist> </datalist>,
id=””, value=””, list=””
<option>
<fieldset> </fieldset>
<legend> </legend>
<style> </style>
<script> </script>
Notes 22