Common HTML Tags
Common HTML Tags are the foundation of web page structure and content. These tags define headings, paragraphs, lists, images, links, tables, and more. Knowing these basic tags is essential for anyone learning HTML and building web pages.
Essential HTML Tags to Get Started
- <html>: The root of every webpage.
- <head>: Where meta info and titles live.
- <title>: Naming your page.
- <body>: The visible content zone.
List of Commonly Used HTML Tags:
Headings Tags (<h1> to <h6>)
- Define headings in decreasing order of importance.
- Example:
<h1>Main Heading</h1>
<h2>Subheading</h2>
Paragraph Tag (<p>)
- Defines a block of text as a paragraph.
- Example:
<p>This is a paragraph of text.</p>
Anchor Tag (<a>)
- Creates hyperlinks to other web pages or resources.
- Example:
<a href="https://www.meripariksha.com/tutorials/d/html">Learn HTML</a>
Image Tag (<img>)
- Embeds images on a webpage.
- Example:
<img src="image.jpg" alt="Description of image">
List Tags (<ul>, <ol>, <li>)
- Create unordered (bulleted) and ordered (numbered) lists.
- Example:
<ul>
<li>Item One</li>
<li>Item Two</li>
</ul>
Table Tags (<table>, <tr>, <td>, <th>)
- Display data in a structured tabular format.
- Example:
<table>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
</tr>
</table>
Line Break (<br>) and Horizontal Rule (<hr>)
- Add line breaks and horizontal dividers in content.
- Example:
<p>Line one.<br>Line two.</p>
<hr>
Conclusion
Learning and mastering these common HTML tags is crucial for building structured, readable, and functional web pages. Once comfortable with these basics, you can move on to more advanced HTML elements and attributes.