HTML5
What are the HTML Tags Deprecated in HTML5?
HTML5 removed many presentational and outdated tags that mixed styling with structure. These deprecated (obsolete) tags may still render in some browsers but should never be used in new code. The modern approach separates content (HTML) from presentation (CSS).
Deprecated Tags and Their Modern Replacements
| Deprecated Tag | What it did | Modern Replacement |
|---|---|---|
| <font> | Set text font, size, and color | CSS: font-family, font-size, color |
| <center> | Centered content | CSS: text-align: center or margin: auto |
| <big> | Made text larger | CSS: font-size |
| <strike> | Struck-through text | <del> or CSS text-decoration: line-through |
| <tt> | Teletype / monospace text | CSS: font-family: monospace, or <code> |
| <acronym> | Marked an acronym | <abbr> |
| <applet> | Embedded Java applets | <object> or <embed> |
| <frame> | A single frame in a frameset | <iframe> or CSS layout |
| <frameset> | Container for frames | CSS layout (Flexbox/Grid) |
| <noframes> | Fallback for frames | Not needed; use semantic layout |
| <marquee> | Scrolling text | CSS animations / transform |
| <blink> | Blinking text | CSS animations (used sparingly) |
| <dir> | Directory list | <ul> (unordered list) |
| <basefont> | Default font for a document | CSS applied to <body> |
Why Were These Removed?
- They controlled presentation, which belongs in CSS, not HTML.
- Frames created usability, accessibility, and bookmarking problems.
- Tags like <marquee> and <blink> harmed accessibility and readability.
- Separating structure from style makes pages easier to maintain and responsive.
⚠️
Even if a deprecated tag still displays in a browser, it is not guaranteed to work in the future. Always use CSS and semantic HTML5 elements instead.
