HTML5 and the HTML 4 Formatting Elements

Welcome to our free HTML tutorial. This tutorial is based on Webucator's Introduction to HTML Training course.

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" (https://www.w3.org/wiki/Html/Elements/b)
<i> Italicizes text For "text in an alternate voice or mood" (https://www.w3.org/wiki/HTML/Elements/i)
<tt> Renders teletype text ** Deprecated **
<big> Increases font size ** Deprecated **
<small> Decreases font size For "side comments and small print" (https://www.w3.org/wiki/HTML/Elements/small)

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

This tutorial is based on Webucator's Introduction to HTML Training Course. We also offer many other HTML Training courses. Sign up today to get help from a live instructor.