HTML Basics
HTML Deprecated Tags
Some old HTML tags are deprecated, meaning they should no longer be used in HTML5. This page lists them and shows what to use instead.
What Does Deprecated Mean?
A deprecated tag is one that is outdated and discouraged. Many controlled appearance directly, a job that now belongs to CSS. Browsers may still render some of them, but you should never use them in new code.
Deprecated Tags and Their Replacements
| Deprecated tag | What it did | Use instead |
|---|---|---|
| <font> | Set text font, size, and color | CSS font-family, font-size, color |
| <center> | Centred content | CSS text-align: center or margin: auto |
| <big> / <tt> | Bigger / monospaced text | CSS font-size / <code> or CSS |
| <strike> / <s> | Struck-through text | <del> or CSS text-decoration |
| <u> | Underlined text (visual) | CSS text-decoration: underline |
| <marquee> | Scrolling text | CSS animations |
| <blink> | Blinking text | Removed entirely; use CSS if truly needed |
| <frame> / <frameset> | Split the window into frames | CSS layout or <iframe> |
| <acronym> | Marked an acronym | <abbr> |
⚠️
Avoid deprecated tags completely. They may stop working in future browsers, hurt accessibility, and mix styling into your HTML. Keep structure in HTML and appearance in CSS.
💡
The bgcolor, align, and border attributes on tags like body, table, and img are also deprecated. Style these with CSS instead.
