HTML5 and the HTML 4 Formatting Elements

Contact Us or call 1-877-932-8228
HTML5 and the HTML 4 Formatting Elements

HTML5 and the HTML 4 Formatting Elements

In HTML 4 and XHTML, all but five formatting tags were deprecated. But in HTML5, none of these are considered formatting elements any more and two of the elements are no longer available. The table indicates how HTML5 treats these tags now.

Obsolete Formatting Tags
Tag Description Notes
<b> Bolds text For "text to be stylistically offset from the normal prose without conveying any extra importance" (see reference)
<i> Italicizes text For "text in an alternate voice or mood" (see reference)
<tt> Renders teletype text ** Deprecated **
<big> Increases font size ** Deprecated **
<small> Decreases font size For "side comments and small print" (see reference)

The example below shows how the three remaining "formatting" tags are used:

Code Sample:

Text/Demos/Formatting.html
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Formatting tags</title>
</head>
<body>
<h1>Formatting tags</h1>
<p>
	<b>Bold</b>
	<i>Italicized</i>
	<small>Small font</small>
</p>
</body>
</html>

Code Explanation

The page is rendered as follows:Formatting Tags

All of these effects can be created with CSS, so if you just want to change the formatting without implying any specific meaning, you should use CSS instead.

Next