These are basic formatting tags. There are more formatting tags which help in enhancing a web page. These tags are used to make the web page more presentable and user-friendly.
Some more formatting tags are elaborated below:
Phrase Tags
The following tags are all phrase element tags. These tags help in providing a richer effect to the web page.
Emphasized Tag
The emphasized tag is written as <em>. This is used to emphasize or stress on a text. The emphasized text in the output is usually in italics.
Example: |
| <em> This text is emphasized </em> |
| |
| Output: |
| This text is emphasized |
Code Tag
The code tag is written as <code>. It indicates that the text written is an example of a typed code. It is usually in a fixed font.
Example: |
| <code> This text is a computer code </code> |
| |
| Output: |
| This text is a computer code |
| |
Variable Tag
The variable tag is written as <var>. It defines a variable. It means that the text written withinthese tags is a variable name. The emphasized text in the output is usually in italics.
Example: |
<var> This is a variable </var> |
|
Output: |
|
This is a variable |
Strong Tag
The strong tag is written as <strong>. This tag helps to emphasize or highlight the text. The text appears in bold.
Example: |
<strong> This text is emphasized. </strong> |
|
Output: |
|
This text is emphasized. |
Preformatted Text Tag
The preformatted text tag is written as <pre>. This tag preserves the preformatted element of the text, like spaces and line breaks. The text written within the <pre> tags will appear in the same way in the web page as in the code.
Example: |
<pre> This is pre tag. </pre> |
|
Output: |
|
This is pre tag. |
Abbreviations Tag
The abbreviations tag is written as <abbr>. This tag indicates an abbreviated form like “inc”, “ USA”, etc. Any kind of abbreviation is placed within the <abbr> tag.
Example: |
<abbr> UNO </abbr> |
|
Output: |
|
UNO |
Address Tag
The address tag is written as <address>. This tag usually defines start of an address. Any kind of address, email or signatures should be put in the address tag. The address is usually shown in italics.
Example: |
| <address> Mickey Mouse <br/> Box 123 <br/> Disneyland</address> |
| |
| Output: |
| Mickey Mouse |
| Box 123 |
| Disneyland |
Blockquote Tag
The blockquote tag is written as <blockquote>. This tag defines the start of a long quotation. When a quotation is to be written, it should always be placed within the blockquote tags.
This tag also generates a line break and white spaces before and after the text. It does not perform any other formatting; like making the text bigger or bolder or italicizing the text.
Example: |
<blockquote>Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend. </blockquote> |
Output: |
|
| Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend. |
This is how a web page in which the above tags have been implemented looks like:
|