HTML (HyperText Markup Language) uses special
elements called tags to structure content on a web page. These
tags tell the browser how to display text, images, links, and other content.
Understanding basic HTML tags is the first step in learning web development.
What are HTML Tags?
HTML tags are keywords enclosed in angle
brackets like <tag>. They usually come in pairs: an opening tag and a
closing tag.
Example:
<p>This is a paragraph.</p>
Here, <p>
is the opening tag and </p> is the closing tag.
Basic HTML Tags You Should Know
1. HTML Structure Tags
These tags form the structure of every web
page.
<!DOCTYPE html><html><head> <title>Page Title</title></head><body></body></html>
·
<!DOCTYPE
html> → Declares HTML5 document
·
<html> → Root element
·
<head> → Contains metadata
·
<body> → Visible content
2. Heading Tags
Heading tags are used for titles and
subtitles.
<h1>Main Heading</h1><h2>Sub Heading</h2><h3>Smaller Heading</h3>
·
<h1> is the largest heading
·
<h6> is the smallest heading
3. Paragraph Tag
Used to write text content.
<p>This is a paragraph in HTML.</p>
4. Anchor Tag (Links)
Used to create hyperlinks.
<a href="https://example.com">Visit Website</a>
5. Image Tag
Used to display images.
<img src="image.jpg" alt="Description of image">
6. Line Break Tag
Used to break a line.
<br>
7. Horizontal Line Taga
Used to insert a horizontal line.
<hr>
8. Bold, Italic, and Underline Tags
<b>Bold Text</b><i>Italic Text</i><u>Underlined Text</u>
9. List Tags
Ordered List:
<ol> <li>Item One</li> <li>Item Two</li></ol>
Unordered List:
<ul> <li>Item One</li> <li>Item Two</li></ul>
Importance of HTML Tags
·
They structure
web pages
·
They improve
readability
·
They make
websites interactive
·
They are
essential for all websites
Conclusion
Basic HTML tags are the foundation of web
development. Once you understand these tags, you can easily start building
simple web pages and move on to advanced topics like CSS and JavaScript.
Practice using these tags regularly to become
confident in HTML coding.
