<sup>
:
<p>H<sub>2</sub>O</p>
(renders as H₂O)<sub>
:
<p>E = mc<sup>2</sup></p>
(renders as E = mc²)<pre>
:
<pre>
This is preformatted text.
It preserves spaces and new lines.
</pre>
<div>
:
<div class="container">
<h1>Header</h1>
<p>Paragraph inside a div.</p>
</div>
<section>
:
<section>
<h2>About Us</h2>
<p>Information about us.</p>
</section>
<nav>
:
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<footer>
:
<footer>
<p>© 2024 Your Company</p>
</footer>
Block-Level Elements:
<div>
, <p>
, <header>
, <footer>
, <section>
, <article>
, <nav>
Inline Elements:
<span>
, <a>
, <strong>
, <em>
, <img>
, <sup>
, <sub>
<ul>
(Unordered List):
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<ol>
(Ordered List):
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<dl>
(Description List):
<dl>
<dt>Term 1</dt>
<dd>Description for term 1</dd>
<dt>Term 2</dt>
<dd>Description for term 2</dd>
</dl>
style
Attribute:
<p style="color: blue; font-size: 16px;">This is a styled paragraph.</p>
Background Color:
<div style="background-color: lightgrey;">
Content with a light grey background.
</div>
Text Color:
<p style="color: #F26A23;">This is orange text.</p>
Text Alignment:
<p style="text-align: center;">This text is centered.</p>
<p style="text-align: right;">This text is aligned to the right.</p>