HTML Formatting
HTML Text Formatting Elements
_ In the previous chapter, you learned about HTML styling, using the HTML style attribute._ HTML also defines special elements for defining text with a special meaning.
_ HTML uses elements like <b> and <i> for formatting output, like bold or italic text.
_ Formatting elements were designed to display special types of text:
We will learn in this chapter hot to :
- Bold text
- Important text
- Italic text
- Emphasized text
- Marked text
- Small text
- Deleted text
- Inserted text
- Subscripts
- Superscripts
HTML Bold and Strong Formatting
-
The HTML <b> element defines bold
text,
without any extra importance.
-
The HTML <strong> element defines strong
text, with added semantic "strong" importance.
Example 1
<p>This text line is normal.</p>
<p><b>This text line is bold</b>.</p>
<p><b>This text line is bold</b>.</p>
Example 2
<p>This text line is normal.</p>
<p><strong>This text line is strong</strong>.</p>
<p><strong>This text line is strong</strong>.</p>
HTML Italic and Emphasized Formatting
-
The HTML <i> element defines italic text, without any extra importance.
-
The HTML <em> element defines emphasized
text, with added semantic importance.
Example 1
<p>This text line is normal.</p>
<p><i>This text line is italic</i>.</p>
<p><i>This text line is italic</i>.</p>
Example 2
<p>This text line is normal.</p>
<p><em>This text line is emphasized</em>.</p>
<p><em>This text line is emphasized</em>.</p>
HTML Small, Subscript and Superscript Formatting
-
The HTML <small> element defines small text formatting.
-
The HTML <sub> element defines subscripted text formatting.
-
The HTML <sup> element defines superscripted text formatting.
Example 1
<p>This text line is normal.</p>
<p>This is HTML <small>Small</small> text Formatting</p>
<p>This is HTML <small>Small</small> text Formatting</p>
Example 2
<p>This text line is normal.</p>
<p>This is <sub>subscripted</sub> text line formatting .</p>
<p>This is <sub>subscripted</sub> text line formatting .</p>
Example 3
<p>This text line is normal.</p>
<p>This is <sup>superscripted</sup> text.</p>
<p>This is <sup>superscripted</sup> text.</p>
HTML Marked , deleted and inserted Formatting
-
The HTML <mark> element defines marked text formatting .
-
The HTML <del> element defines deleted text formatting .
-
The HTML <ins> element defines inserted text formatting .
Example 1
<p>This text line is normal.</p>
<p>This is HTML <mark>Marked</mark> text Formatting</p>
<p>This is HTML <mark>Marked</mark> text Formatting</p>
Example 2
<p>This text line is normal.</p>
<p>This is <del>deleted</del> text line formatting .</p>
<p>This is <del>deleted</del> text line formatting .</p>
Example 3
<p>This text line is normal.</p>
<p>This is <ins>inserted</ins> text.</p>
<p>This is <ins>inserted</ins> text.</p>
HTML Text Formatting Elements
Tag | Description |
---|---|
<b> | Defines bold text |
<em> | Defines emphasized text |
<i> | Defines italic text |
<small> | Defines smaller text |
<strong> | Defines important text |
<sub> | Defines subscripted text |
<sup> | Defines superscripted text |
<ins> | Defines inserted text |
<del> | Defines deleted text |
<mark> | Defines marked/highlighted text |
من نحن
نحن مجموعة من الشباب العربى اخذنا على عاتقنا مهمة تعليم لغة البرمجة للمتحدثين بالعربية والذين يجدون صعوبة فى فهم شرح الأكواد باللغات الأخرى وذلك ايمانا منا بسهولة لغات البرمجة
Previous Tutorial