
HTML Text is written using tags. By default, the text written in body is called plain text. All text elements are written inside body. <p>
is the common tag use to write paragraphs. There are six headings in html, h1-h6
. Here is a list of popular HTML Text tags with example.
Paragraph Tag
Paragraph Tag or p tag is most commonly used tag to write a paragraph in HTML. By default p tag is Block level and occupy 1 em font size. P tag always start and ends in a new line. Default with of p tag is 100% of parent element.
Align attribute is removed in HTML5. To align text in Html5, use CSS text align.
This is a Paragraph
This is a Paragraph
<p>This is a Paragraph</p>
<p>This is a Paragraph</p>
Address Tag
Address tag is used to add postal address in a webpage. Address is function element, and italic in style. Default font-size is 1em.
3rd Floor, OM Complex,
Sec 15, Noida UP, 201301
Ph: (0120) 4280181
<address>
Tech Altum <br>
Sec 15, Noida UP, 201301<br>
Ph: (0120) 4280181
</address>
Blockquote
Blockquote tag is used to write a Block Level quotation with extended quotation in HTML. This is mainly a text with Extended Quotation. By-default there is a margin of 40px from left and right in blockquote.
This is blockquote Tag.
<blockquote> blockquote Tag </blockquote>
PRE Tag
All HTML Textual Tags ignore white space and line break. Means text is not formatted.
PRE Tag is the only tag which follow the exact format in which you are writing.
PRE Tag
PRE Tag with white spacing more than one
PRE Tag with line break
<pre> PRE Tag </pre>
<pre> PRE Tag with white spacing more than one </pre>
<pre> PRE
Tag with line break </pre>
TT Tag
TT( Tele Type) Tag was an inline element with default monospace font. In HTML5, we can use css font-family property to do same.
(Removed in HTML5)
TT Tag
<tt> TT Tag </tt>
FONT Tag
Font Tag was used to add color, font-family and size to the text inside font tag. But in HTML5, we use css to change style of text.
(Depreciated in HTML5)
Default FONT Tag
Font Tag with color red
Font Tag with cursive face
Font Tag with size 1
Font Tag with size 7
Font Tag with size 3 and face "Times New Roman".
Font Tag with size 4 and face "Verdana".
Font Tag with size 5 and face "Comic Sans MS".
Font Tag with size 6, face Algerian and color blue.
<font> Default FONT Tag ;/font>
<font color="red"> Font Tag with color red </font>
<font face="cursive"> Font Tag with cursive face </font>
<font size="1"> Font Tag with size 1 </font>
<font size="7"> Font Tag with size 7 </font>
<font size="3" face="Times New Roman"> Font Tag with size 3 and face "Times New Roman". </font>
<font size="4" face="Verdana"> Font Tag with size 4 and face "Verdana". </font>
<font size="5" face="Comic sans MS"> Font Tag with size 5 and face "Comic san MS". </font>
<font face="algerian" size="6" color="blue"> Font Tag with size 6, face Algerian and color blue. </font>
Font and tt tag are deleted in HTML5.