HTML5
What are the HTML Tags Deprecated in HTML5?
HTML5 removed many old presentational tags whose only job was styling — because styling belongs in CSS, not HTML. These tags are considered obsolete and should not be used. Here is a reference table of the most common deprecated elements and what to use instead.
Why Were Tags Deprecated?
HTML5 enforces a clean separation of concerns: HTML describes structure and meaning, while CSS handles presentation. Tags that only controlled appearance (fonts, colours, alignment, blinking text) were dropped in favour of CSS. Some layout tags like <frame> and <frameset> were removed for accessibility and usability reasons.
Deprecated Tags and Their Replacements
| Deprecated Tag | What It Did | Modern Replacement |
|---|---|---|
| <font> | Set font face, size, colour | CSS font-family, font-size, color |
| <center> | Centred content | CSS text-align: center or margin: auto |
| <big> | Larger text | CSS font-size |
| <strike> / <s> | Strikethrough text | CSS text-decoration or <del> |
| <tt> | Teletype/monospace text | CSS font-family: monospace or <code> |
| <u> (old use) | Underline for style | CSS text-decoration: underline |
| <basefont> | Default document font | CSS on <body> |
| <frame> / <frameset> | Split page into frames | <iframe> or CSS layout |
| <noframes> | Fallback for frames | Not needed |
| <acronym> | Marked acronyms | <abbr> |
| <applet> | Embedded Java applet | <object> or <embed> |
| <marquee> | Scrolling text | CSS animations |
| <blink> | Blinking text | CSS animations (use sparingly) |
| <dir> | Directory list | <ul> |
Deprecated tags may still render in some browsers for backward compatibility, but you must not use them in new code. They can break in future browsers and hurt accessibility and SEO.
Correct Modern Approach
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Modern Styling</title>
<style>
.title { text-align: center; color: #1a73e8; font-size: 28px; }
</style>
</head>
<body>
<!-- Old, deprecated way (do NOT use):
<center><font color="blue" size="6">Hello</font></center> -->
<!-- Modern, correct way: -->
<h1 class="title">Hello</h1>
</body>
</html>