Text Formatting

Valid values for id attribute

To format html text several elements are used. Now day we can do this by css style. But you can still use html element for formatting.

Text Formatting types:

<pre> Element:
<pre>
The quick brown fox jumps over the lazy dog
</pre>

<del> Element
The quick brown fox <del>jumps</del> over the lazy dog

<sup> Element
<p> The quick brown fox jumps <sup>over</sup> the lazy dog </p>

<sub> Element
<p> The quick brown fox jumps <sub>over</sub> the lazy dog </p>

<code> Element
<p> The quick brown fox jumps <code>over</code> the lazy dog </p>

<em> Element
<p> The quick brown fox jumps <em>over</em> the lazy dog </p>

<strong> Element
The quick brown fox jumps <strong>over</strong> the lazy dog

<i> Element
The quick brown fox jumps <i>over</i> the lazy dog

<b> Element
The quick brown fox jumps <b>over</b> the lazy dog

<hr> Element
<p> this is paragraph1 </p>
<hr>
<p> this is paragraph2 </p>

<br> Element
this is line 1
<br />
this is line 2

<p> Element
<p> this is paragraph1 </p>
<p> this is paragraph2 </p>

<h1> to <h6> Elements
<h1> this is heading 1 </h1>
<h2> this is heading 2 </h2>
<h3> this is heading 3 </h3>
<h4> this is heading 4 </h4>
<h5> this is heading 5 </h5>
<h6> this is heading 6 </h6>

Leave a Reply

Your email address will not be published. Required fields are marked *