Formatting in HTML refers to the process of arranging and styling text and other content on a webpage. HTML provides a number of tags and attributes that can be used to format text, including headings, paragraphs, lists, and more.
One of the most basic formatting tags in HTML is the <p> tag, which is used to create paragraphs of text. The p tag automatically adds a line break before and after the text, creating a distinct block of text.
<p>This is a paragraph text</p> <p>This is another paragraph text</p>
List of Formatting Elements:
- <br/>: Line break.
- <b>: Bold text
- <strong>: Important text
- <i>: Italic text
- <u>: unarticulated text
- <em>: Emphasized text
- <mark>: Marked text
- <small>: Smaller text
- <del>: Deleted text
- <ins>: Inserted text
- <sub>: Subscript text
- <sup>: Superscript text
HTML <br/> Element.
<p>This is paragraph for showing example of <br /> line break.</p>
<p>This is simple text</p> <p><b>This is a bold text</b></p> <p><strong>This is a bold and important text</strong></p>
HTML <i>, <u> and <em> Elements.
<p>This is a simple paragraph</p> <p><i>This is an italic text</i></p>
<p>This is a <u>simple</u> paragraph</p>
The <em> tag in HTML stands for emphasized text and the content inside this is displayed in italic font.
<p>This is an simple paragraph</p> <p><em>This is an emphasized paragraph</em></p>
<p>This is a simple paragraph</p> <p><small>This is smaller paragraph</small></p>
<p>The speed limit of this road is <mark>40KM/hr</mark>.</p>
HTML <del> Element
<p>I love playing <del>cricket</del> football</p>
<p>This is an equation: x<sub>1</sub> + x<sub>2</sub> = x<sub>3</sub></p>
HTML <sup> Element
The <sup> tag in HTML is used to create superscript text, which is text that is slightly smaller and appears slightly higher than the surrounding text. Superscript text is often used in mathematical or scientific equations to indicate exponents, footnotes, or other similar uses.<p>This is an equation: x<sup>2</sup> + y<sup>2</sup> = z<sup>2</sup></p>
No comments:
Post a Comment