HTML Text Formatting

Text Formatting

The following example demonstrates how you can format text in an HTML document.

<html>
<head>
<title>HTML Formatting</title>
</head>
<body>
	<p>
		<b>bold text</b>
	</p>
	<p>
		<strong>strong text</strong>
	</p>
	<p>
		<em>emphasized text</em>
	</p>
	<p>
		<i>italic text</i>
	</p>
	<p>
		<small>small text </small>
	</p>
	<p>
		H<sub>2</sub> O <sup>2</sup>
	</p>
</body>
</html>

Deleted and Inserted Text

This example demonstrates how to mark a text that is deleted (strikethrough) or inserted (underscore) to a document.

<html>
<head>
<title>HTML deleted and insert</title>
</head>
<body>
	<p>
		a dozen is
		<del>twenty</del>
		<ins>twelve</ins>
		pieces
	</p>
	<p>
		Most browsers will
		<del>overstrike</del>
		deleted text and
		<ins>underscore</ins>
		inserted text.
	</p>
	<p>Some older browsers will display deleted or inserted text as plain text.
	</p>
</body>
</html>