Obsolete Elements

ID

html.obsolete_elements

Severity

low

Remediation Complexity

low

Remediation Risk

low

Remediation Effort

low

Resource

Reliability

Language

Html

Tags

reliability

Description

Flags opening elements whose tag name is an obsolete or deprecated HTML element, such as <center>, <font>, <marquee>, <applet>, <big>, <tt> or <strike>.

Rationale

These elements were removed from the HTML standard and are no longer guaranteed to be supported by browsers. They mix presentation with structure and have modern replacements (CSS for layout and typography, semantic elements for structure). Keeping them is a reliability risk, as a browser may stop rendering them at any time.

<center>Welcome</center>           <!-- FLAW — obsolete element -->
<font color="red">Hi</font>        <!-- FLAW — obsolete element -->

<div class="centered">Welcome</div>  <!-- OK — semantic element + CSS -->
<section>Hi</section>                 <!-- OK — semantic element -->

Remediation

Replace obsolete elements with semantic markup and CSS. For example, use a <div> or <section> with a text-align: center style instead of <center>, and style text with CSS instead of <font>.