Text formatting in HTML
HTML provides several tags for formatting text, including:
<h1> through <h6> for headings
<p> for paragraphs
<em> for emphasizing text (usually displayed as italic)
<strong> for highlighting text (usually displayed as bold)
<u> for underlining text
<s> for striking through text
<sub> for subscript
<sup> for superscript
Here's an example of some formatted text:
html
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p><em>This text is emphasized.</em></p>
<p><strong>This text is highlighted.</strong></p>
<p><u>This text is underlined.</u></p>
<p><s>This text is struck through.</s></p>
<p>H<sub>2</sub>O</p>
<p>E = mc<sup>2</sup></p>
No comments:
Post a Comment