Web pages consist of content. That content must be formatted in some occasions to our needs. The way to do it is by using the Text Formatting elements as outlined bellow. Remember that every element has a start tag and an an tag.
<b>Bold text</b>
<strong>Important text</strong>
<ins>Inserted text</ins>
<i>Italic text</i>
<em>Emphasized text</em>
<sub>Subscript text</sub>
<sup>Superscript text</sup>
<mark>Marked text</mark>
<small>Small text</small>
<del>Deleted text</del>
<b> and <strong> elements
Both elements are quite the same in nature but different in coding so that the web developer makes a difference between them. The visual representation of the code is the same. the <strong> element stresses the importance of the content within that particular element.
<b>Some content</b>
<strong>Some content</strong>
<i> and <em>
<i>Some content</i>
<em>Some content</em>
Both elements display the text in italic but the code is different. The <em> element stresses the importance of the content within that particular element.
<ins> element
The <ins> element defines an inserted text (underline text)
<p>Some content is <ins>inserted</ins></p>
<sub> sub-scripted element
Let's say we want to present the number two sub-scripted in this example X2
<p>X<sub>2</sub></p>

<sup> super-scripted element
Let's say we want to present the number two super-scripted in this example X2
<p>X<sup>2</sup></p>

<del> element
Lets say we want to cross line the text developer bellow. To do that we use the <del> element
<p> I am a <del>developer</del></p>

<mark> element
If we want to highlight a portion of a text within paragraph then we use <mark> element for that purpose
<p> I am a <mark>web developer</mark></p>

<small> element
How great would it be if you can manipulate with the size of a text within a heading for an instance
<h1> I am a <small>web developer</small></h1>

Notice how the web developer text is a bit smaller
To recap we learned about the following HTML Text Formatting elements. We can use them anywhere within the <body> of the web pages.
<b>Bold text</b>
<strong>Important text</strong>
<ins>Inserted text</ins>
<i>Italic text</i>
<em>Emphasized text</em>
<sub>Subscript text</sub>
<sup>Superscript text</sup>
<mark>Marked text</mark>
<small>Small text</small>
<del>Deleted text</del>
Comments
Post a Comment