HTML – Basic Notes (Class 7)
What is HTML?
HTML stands for HyperText Markup Language
It is used to create web pages
HTML tells the browser what to display and how to display it
HTML is not a programming language, it is a markup language
HTML Tags
HTML works using tags
Tags are written inside angle brackets < >
Most tags have:
o Opening tag: <tag>
o Closing tag: </tag>
Example:
<p>This is a paragraph</p>
Basic Structure of an HTML Document
Every HTML page has a basic structure:
<html>
<head>
<title>My Web Page</title>
</head>
<body>
Welcome to HTML
</body>
</html>
Explanation:
<html> – Root of the document
<head> – Contains page information
<title> – Title shown on browser tab
<body> – Main content of the web page
Common HTML Tags
Tag Use
<h1> to <h6> Headings
<p> Paragraph
<br> Line break
<hr> Horizontal line
<b> Bold text
<i> Italic text
<u> Underline text
Heading Tags
Used to show headings
<h1> is the largest
<h6> is the smallest
Example:
<h1>Main Heading</h1>
<h3>Sub Heading</h3>
Paragraph Tag
Used to write text in paragraph form
<p>This is a paragraph.</p>
HTML Attributes
Attributes give extra information about tags
Written inside the opening tag
Example:
<body bgcolor="yellow">
Lists in HTML
Ordered List
<ol>
<li>Pen</li>
<li>Pencil</li>
</ol>
Unordered List
<ul>
<li>Apple</li>
<li>Banana</li>
</ul>
Advantages of HTML
Easy to learn
Used to create web pages
Supported by all browsers
Free to use
Conclusion
HTML is the basic language of the web
It helps us create and design web pages
Learning HTML is the first step to web development 🌐