HTML
HTML (HyperText Markup Language) is the standard language used to
create and design web pages.
It provides the basic structure of a webpage using a system of elements
enclosed in tags (< >).
Why HTML?
HTML is essential for web development because:
1. Defines the Structure – It organizes the content on a webpage, such as
headings, paragraphs, images, and links.
2. Foundation of Web Development – It works with CSS (for styling) and
JavaScript (for interactivity) to create full-featured websites.
3. Easy to Learn & Use – Simple syntax with readable tags makes
4. it beginner-friendly.
5. Cross-Platform Compatibility – Works on all browsers and devices.
6. SEO-Friendly – Proper HTML structure helps search engines understand
and rank webpages better.
Paired tags
Paired tags have both an opening tag and a closing tag. The closing tag is
written with a forward slash (/) before the tag name.
Example : <h1> </h1> , <p> </p>
Unpaired tags
Unpaired tags do not have a closing tag. They are self-closing, meaning they
work alone without wrapping any content.
Example : <hr/> , <br> , <img>
--------------------------------------------------------------------------------------------------------------------------------------
+91 6305693431, 9154641231, 8790732332
nd
MIG 214, 2 Floor, KPHB Kukatpally, Hyderabad, 500072|SRA EDUTECH PVT LTD
STRUCTURE OF HTML
Elements
Elements are define as a combination of opening tag and closing tag with
content is called as element.
Example: <h1> HELLO WORLD </h1>
Types of Elements
Block-Level Elements
These elements take up the full width of the page and start on a
new line.
--------------------------------------------------------------------------------------------------------------------------------------
+91 6305693431, 9154641231, 8790732332
nd
MIG 214, 2 Floor, KPHB Kukatpally, Hyderabad, 500072|SRA EDUTECH PVT LTD
Examples:
1. <h1> - <h6> → Headings (Titles on a webpage)
2. <p> → Paragraph (Used for text)
3. <div> → Division (A container to group elements)
4. <section> → Defines a section of a webpage
5. <article> → Represents an independent content piece.
Inline-Level Elements
These elements do not start on a new line and only take up as much
space as needed.
Examples:
1. <span> → Used to style a part of the text
2. <a> → Hyperlink (Used to link to other pages)
3. <strong> → Makes text bold
4. <em> → Makes text italic
--------------------------------------------------------------------------------------------------------------------------------------
+91 6305693431, 9154641231, 8790732332
nd
MIG 214, 2 Floor, KPHB Kukatpally, Hyderabad, 500072|SRA EDUTECH PVT LTD