HTML Text Formatting
HTML has a number of elements for defining text with a specific meaning.
HTML Formatting Elements
Formatting components were created to display different sorts of text:
<b> Bold text
The HTML b> element defines bold text without any additional significance.
for example
<b>This is a bold text</b>
<strong> - Important text
The HTML strong> element denotes text that is of high importance. The text is usually presented in bold.
<em> Emphasized text
The HTML <em> element specifies highlighted text. Italics are commonly used to highlight the information inside. A screen reader will emphasize the words in <em> by employing verbal stress.for example
<strong>This sentence is very strong</strong>
<i> Italic text
The HTML I element specifies a section of text in a different voice or mood. Italics are commonly used to highlight the information inside. The <I > tag is frequently used to represent a technical word, a phrase from another language, an idea, the name of a ship, and so on.for example
<i>This sentence is italic format </i>
<mark> Marked text
The HTML <mark> element specifies the text to be marked or highlighted:
for example
<p>Please do get back the <mark>book</mark> today positively.</p><small> Smaller text
Smaller text is defined using the HTML <small> element:for example
<small>Smaller text</small>
<del> Deleted text
HTML <del> Element
The HTML <del> element represents text that has been removed from a document. In most cases, browsers will punch a line across the removed text:
for example
<p>I love <del>Maria</del> Lulia.</p>
<ins> Inserted text
<sub> Subscript text
<ins> Inserted text
Element <ins> HTML
The HTML ins> element specifies the text that has been added to a document. In most cases, browsers will highlight added text:
for example
<p>My favorite play is <del>Badminton</del> <ins>Football</ins>.</p>
<sub> Subscript text
Subscript text is defined using the HTML <sub> element. Subscript text is shown half a character below the usual line and is occasionally displayed in a smaller font. Chemical formulae, such as H2O, can benefit from the subscript text.
for example
<p>H<sub>2</sub>O.</p>
Result : H2O
<sup> Superscript text
HTML Element <sup>
Superscript text is defined using the HTML <sup> element. Superscript text is half a character above the usual line and is often shown in a smaller font. Footnotes can be written in superscript text, as WWW[1]:
for example
<p>WWW<sup>[1]</sup> text.</p>
Result : WWW[1]
Comments
Post a Comment