HTML Tag List
HTML, or Hyper Text Markup Language, is the standard markup language used for creating web pages. It's the backbone of any website and gives the web its basic structure, which is enhanced and modified by other technologies like CSS and JavaScript.
HTML uses various tags to define the parts of a web page. Here is a comprehensive list of some HTML tags that you need to know as a beginner:
Heading Tags
HTML heading tags are used to define headings. It starts from <h1>
to <h6>
with <h1>
being the highest (or most important) level and <h6>
the least.
<h1>This is a Heading</h1>
<h2>This is a Heading</h2>
<h3>This is a Heading</h3>
<h4>This is a Heading</h4>
<h5>This is a Heading</h5>
<h6>This is a Heading</h6>
Paragraph Tag
The <p>
tag defines a paragraph.
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Link Tag
The <a>
tag defines a hyperlink, which is used to link from one page to another.
<a href="https://www.example.com">This is a link</a>
Image Tag
The <img>
tag is used to embed an image in an HTML page. Remember, it is a self closing tag.
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="600">
List Tags
HTML offers two types of lists: unordered and ordered. Unordered lists are created using the <ul>
tag and the list items are created using the <li>
tag. Ordered lists use the <ol>
tag.
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Table Tags
HTML tables are defined with the <table>
tag. A table is divided into rows (with the <tr>
tag), and each row is divided into data cells (with the <td>
tag). The letters td stands for "table data," which is the content of a data cell.
<table>
<tr>
<td>Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
<tr>
<td>Row 2, cell 1</td>
<td>Row 2, cell 2</td>
</tr>
</table>
Div and Span Tags
The <div>
tag is a container that is used to group other HTML elements and apply CSS styles to them. The <span>
tag is similar to the div tag but it is used inline with the text.
<div style="color:#0000FF">
<h3>This is a heading in a div element</h3>
<p>This is some text in a div element.</p>
</div>
<p>This is <span style="color:blue">blue</span> colored text.</p>
These are just a few of the many HTML tags available. As you progress, you'll learn more complex tags and how they can be combined to create diverse and interactive web pages. Happy coding!