HTML Text Formating
HTML contains several element that change text formating
Example
This is bold text
This is italic text
This is subscript and superscript
HTML Formating Element
- <b> - Bold text
- <strong> - Important text
- <i> - Italic text
- <em>- Emphasized text
- <mark> - Marked text
- <small> - Small text
- <del> - Deleted text
- <ins> - Inserted text
- <sub> - Subscript text
- <sup> Superscript text
HTML <b> and <strong> Element
The both <b> and <strong> Element make text bold but <b> element used to text bold and it not important
<strong> also make text bold . The bolded text have importance meaning
Example
<b> This is bold element </b>
<b> This text inside bold </b>
Result
This is bold element
This text inside bold
Example
<strong> Element
<strong> This is strong text</strong>
<strong> This is strong element </strong>
Result
This is strong text
This is strong element
HTML <i> and <em> element
word closing by <i></i> tag make word apper in italic form
The <i> element also represent a selection of text that would be said in difference way from surrounded content - such as technical terms names of ships , foreign word ,thought or other term that would usally be italicized
Example
<i>hello word </i>
<i> text inside this is italic </i>
Result
hello word
text inside this is italicNote - <em> element define emphasided text but both <i> and <em> text formating same
HTML <small> Element
The html small element make text size small than normal size
HTML <mark> Element
HTML mark element define text be marked or highlighted i.e ( text background color change )
Note : By default background-color yellow
Example
<mark> This is mark text </mark>
Result
This is mark text
HTML <del> Element
HTML - del element define text are deleted and have no meaning