HTML tags
Types of Tags in HTML
There are mainly two types of tags available in the HTML. They are as:
(1) Paired tag: This tag has both start and end tags. For example, <b> and </b> tags are the paired tags.
(2) Empty tag: This tag does not require to be closed. It has only start tag. For example, <br> tag is an empty tag.
How do HTML Tags work?
The function of HTML tags is to define the structure and content of a webpage. When a web browser renders a webpage, it reads the HTML code line by line and interprets these tags to display the content on the webpage.
Types of Elements
There are mainly two basic types of markup elements. They are as:
1. Block element :
- A block-level element always starts on a new line, and the browsers automatically add some space (a margin) before and after the element.
- A block-level element always takes up the full width available (stretches out to the left and right as far as it can).
- Two commonly used block elements are: <p> and <div>.
Here are the block-level elements in HTML:
<address> <article> <aside> <blockquote> <div> <fieldset> <footer> <form> <h1>-<h6> <header> <hr> <li> <main> <nav> <ol> <p>< pre> <section> <table> <tfoot> <ul><video>
2. Inline element :
- An inline element does not start on a new line.
- An inline element only takes up as much width as necessary.
- This is a <span> element inside a paragraph.
<a> <b> <bdo> <big> <br> <button> <cite> <code> <dfn> <em> <i> <img> <input> <kbd> <label> <select> <small> <span> <strong> <sub> <sup> <textarea> <time> <var>
Commonly used Basic Tags
Here are some of the commonly used basic tags in HTML that you should keep it mind.
<html>
<head>
<title>
<body>
<h1> to <h6>
<p>
<br>
<hr>
<!–. . . –>
Commonly used Char Tags
Here are some of the commonly used char tags in HTML that you should keep it mind.
<b>
<i>
<em>
<big>
<strong>
<small>
<sup>
<sub>
<bdo>
<u>
Commonly used Output Tags
The most commonly used output tags are as:
<pre>
<code>
<kbd>
<var>
<dfn>
<samp>
Commonly used Block Tags
The most commonly used block tags are as:
<acronym>
<abbr>
<address>
<blockquote>
<q>
<cite>
<ins>
<del>
<s>
<a>
Commonly used Input, List, Image, and Table Tags
The most commonly used input tags are as:
<form>
<input>
<button>
<select>
<optgroup>
<option>
<label>
List tags:
<ul>
<ol>
<li>
<dir>
<dl>
<dt>
<dd>
<menu>
Image tags:
<img>
<map>
<area>
Table tags:
<table>
<caption>
<th>
<tr>
<td>
<thead>
<tbody>
Comments
Post a Comment