Topics
Text Formatting Tags
By Saket Bhatnagar••Beginner to Intermediate
text formatting tags
Italics tag
- 1It is inline level element.
- 2It is container tag.
- 3It is used to display content in italics style.
- 4The text between <i> ..text.. </i> tag will be in italics style.
- 5Example: This is italics text.
Bold tag
- 1It is inline level element.
- 2It is container tag.
- 3It is used to display content in bold style.
- 4The text between <b> ..text.. </b> tag will be in bold style.
- 5Example: This is bold text.
Underline tag
- 1It is inline level element.
- 2It is container tag.
- 3It is used to underline the text.
- 4The text between <u> ..text.. </u> tag will be underlined.
- 5Example: This is underlined text.
Emphasise tag
- 1It is inline level element.
- 2It is container tag.
- 3It is used to display content in italics style.
- 4The text between <em> ..text.. </em> tag will be in italics style and also mark the text as important for crawler.
- 5Example: This is italics text.
Strong tag
- 1It is inline level element.
- 2It is container tag.
- 3It is used to display content in bold style.
- 4The text between <strong> ..text.. </strong> tag will be in bold style and also mark the text as important for crawler.
- 5Example: This is italics text.
Insert tag
- 1It is inline level element.
- 2It is container tag.
- 3It is used to mark the inserted content in webpage.
- 4The text between <ins> ..text.. </ins> tag will be marked as recently added content in website and also explain the same to crawler.
- 5Example: This is underlined text.
Superscript tag
- 1It is inline level element.
- 2It is container tag.
- 3It is used to display text as superscript.
- 4The text between <sup> ..text.. </sup> tag display text as superscript.
- 5Example: 108 (Here, 8 is written at top of 10 and 8 is superscript here. )
Subscript tag
- 1It is inline level element.
- 2It is container tag.
- 3It is used to display text as subscript.
- 4The text between <sub> ..text.. </sub> tag display text as subscript.
- 5Example: CO2 (Here,2 is written at bottom of O and 2 is subscript here.)
Code tag
- 1It is inline level element.
- 2It is container tag.
- 3The <code> tag is used to indicate that a section of text is code, typically used for programming languages or markup languages.
- 4The text between <code> ..text.. </code> tag is displayed as code.
- 5Example: <code>console.log('Hello from JavaScript')</code> (Here, <code> tag is used to represent Javascript code.)
Address tag
- 1It is block level element.
- 2It is container tag.
- 3The <address> tag is used to provide contact information for the author or owner of a document.
- 4The text between <address> ..text..</address> tag is displayed as address.
- 5Example: <address>A-123 Main Str <br> USA</address> (Here, <address> tag is used to represent address of some place.)
Quote tag
- 1It is inline level element.
- 2It is container tag.
- 3<q> tag is used for shorter quotes i.e, for single line quotation.
- 4The text between <q> ..text.. </q> tag is displayed as quotation(text will be in double quotes)
- 5Example: <q> I am quote tag </q> (Here, <q> Tag is used to represent single line quotation.)
Blockquote tag
- 1It is block level element.
- 2It is container tag.
- 3The <blockquote> tag is used for longer quotes i.e, multi line quotation
- 4The text between <blockquote> ..text.. </blockquote> tag is The blockquote is usually indented and styled differently from the surrounding text
- 5Example: <blockquote>I am blockquote tag.</blockquote>(Here, <blockquote> tag is used for multi line quotation.)
Abbr tag
- 1It is inline level element.
- 2It is container tag.
- 3The <abbr> tag is used to mark up the abbreviation.
- 4The text between <abbr> ..text.. </abbr> tag is used for mark up the term for abbreviation and we can provide the expansion of the term by using title attribute of <abbr> tag
- 5Example: <abbr title='World Wide Web Consortium'> W3C </abbr> (Here, <abbr> tag is used for marking abbreviation to W3C and the expansion of W3C is written within titile attribute, so when the user hovers over the term it's expansion is displayed.
del tag
- 1It is inline level element.
- 2It is container tag.
- 3The <del> tag is used to indicate that text has been deleted or removed from a document.
- 4The text between <del> ..text.. </del> tag is displayed as deleted content.
- 5Example: <del>Kerala</del> (Here, Kerala has been struck through using the <del> tag to indicate that it has been deleted.)
Br tag
- 1It is non container tag
- 2It is used to provide line breaks.
- 3Example: <p> Hello, <br> I am pragraph tag. (Here, <br> tag is used to provide line break after Hello)