🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Obsolete HTML Elements and Replacements

Web FoundationsđŸŸĸ Free Lesson

Obsolete HTML Elements and Replacements

Open a page built in the early 2000s and you will meet old friends: center, font, big, small, marquee, blink, frameset. Browsers still render most of them — HTML parsers are famously backward-compatible — which is precisely the trap. Obsolete markup keeps working just well enough that nobody migrates it, while quietly harming accessibility, responsiveness and maintainability. This lesson explains why these elements left the standard, what to replace each one with, and how to refactor a legacy page without changing its appearance on day one.

Why browsers still render dead tags

HTML5 drew a hard line: elements are either standard, obsolete-but-conforming (meaning they have a defined rendering but should not be used in new work), or non-conforming (removed from the spec entirely). marquee, blink and frameset fall in the last group; center, font, big and small were deprecated when HTML and presentation were separated. The parser retains support because billions of archived pages depend on it, and breaking them would make the web worse, not better.

The cost of keeping them is invisible until you look for it. Screen readers announce deprecated elements inconsistently, so a center wrapper contributes nothing to the accessibility tree while adding a node to every layout. Search engines and validators flag the markup. Responsive behaviour breaks, because a font size="5" cannot respond to a media query the way a class with clamp() can. And every new developer who meets a font tag in 2026 wonders whether the codebase is serious.

The presentational tags and their CSS equivalents

Nearly every deprecated element existed to express presentation directly in markup. CSS absorbed those responsibilities completely, usually with less code and always with more control.

Obsolete element or attributeWhat it didModern replacement
centerCentered block contentmargin-inline: auto with a max-width, or a flex/grid parent
font color, face, sizeStyled text inlineClasses plus font-family, color and fontSize rules
big, smallScaled text one stepRelative fontSize such as 1.2em or 0.875em
marqueeScrolling textCSS animation or a purpose-built carousel with controls
blinkFlashing visibilityCSS animation with prefers-reduced-motion guard
strikeStruck-through textdel for deletions, s for no-longer-accurate content
ttTelemetric/monospace textcode or kbd elements with font-family styling
uUnderlined textProper semantic elements first; text-decoration only if the underline is truly decorative
spacer, transparent GIFTable padding hacksCSS padding, margin, border-spacing and gap
layer, ilayerEarly positioningCSS position plus a modern layout system

Two details deserve emphasis. First, del and s are not interchangeable: del marks content removed from the document as an edit, while s marks text that is no longer accurate without implying an edit — using strike threw away that distinction for everyone. Second, marquee and blink were removed for real reasons: uncontrollable motion is an accessibility hazard, and users with vestibular disorders need animations they can pause or disable. Any replacement should honor prefers-reduced-motion from the start.

Layout fossils: frameset, table layout and presentational tables

Before CSS layout, entire page structures were assembled with frameset and frame, or with nested layout tables full of spacer cells. Both patterns fail modern expectations: frames break the URL model (each pane has its own address, bookmarks misbehave, printing is a mess), and layout tables confuse assistive technology that announces row and column counts for what is really a sidebar.

Replace a frameset with a normal document: a header, a nav, a main for the primary content and an aside for secondary panes, wired together with CSS Grid or Flexbox. Replace a layout table with Grid areas or a two-column flex row, and when a table genuinely holds tabular data, keep the table but add a caption, header cells with scope attributes and a wrapper that scrolls horizontally instead of squeezing columns into oblivion.

Refactoring a legacy page without a redesign

A safe migration is mechanical before it is visual. Snapshot the page at a few widths, then work through the document in passes. Swap each deprecated tag for the nearest semantic element, wrap the affected text in a class, and write a CSS rule that reproduces the old appearance exactly. Once the visuals match, tune the CSS toward the design system — replace hard-coded font sizes with the type scale, convert marquee motion into a CSS animation with a pause control, and delete the leftover classes.

<!-- Legacy markup as found in an old CMS template -->
<center>
  <font size="5" color="#c0392b">Season sale — 40% off</font>
  <table border="1" cellpadding="8" width="90%">
    <tr><td><b>Product</b></td><td><b>Price</b></td></tr>
    <tr><td>Kettle</td><td>$29</td></tr>
    <tr><td>Mug set</td><td>$19</td></tr>
  </table>
  <marquee behavior="scroll" scrollamount="4">Free shipping this week only</marquee>
</center>
<!-- Refactored: semantic structure, CSS owns presentation -->
<section class="promo" aria-labelledby="promo-heading">
  <h2 id="promo-heading" class="promo-title">Season sale — 40% off</h2>

  <table class="price-table">
    <caption>Featured sale items</caption>
    <thead>
      <tr><th scope="col">Product</th><th scope="col">Price</th></tr>
    </thead>
    <tbody>
      <tr><td>Kettle</td><td>$29</td></tr>
      <tr><td>Mug set</td><td>$19</td></tr>
    </tbody>
  </table>

  <p class="promo-ticker" role="note">Free shipping this week only</p>
</section>

<style>
  .promo { text-align: center; width: 90%; margin-inline: auto; }
  .promo-title { color: #c0392b; font-size: 1.75rem; margin-block: 1rem; }
  .price-table { margin-inline: auto; border-collapse: collapse; }
  .price-table th, .price-table td { border: 1px solid #444; padding: 0.5rem 1rem; }
  .promo-ticker { overflow: hidden; white-space: nowrap; padding-block: 0.5rem; }
  .promo-ticker::after {
    content: ''; display: inline-block; width: 100%;
    animation: ticker 12s linear infinite;
  }
  @keyframes ticker {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
  }
  @media (prefers-reduced-motion: reduce) {
    .promo-ticker::after { animation: none; }
    .promo-ticker { white-space: normal; }
  }
</style>

The rewritten version keeps the same visual intent but adds a caption, real table semantics, a heading that screen readers can navigate to, and motion that respects the user's reduced-motion setting. Nothing in the refactor required a framework — just elements that still exist in ten years.

Frames, applets and other fossils you may still meet

Some obsolete patterns are rarer but still appear in archived projects. frameset and noframes were dropped entirely; migrate to a single document with landmarks and CSS layout, and use the History API if you truly need pane-like navigation. applet died with Java browser plug-ins; the closest living relatives are embed and iframe for genuinely external interactive content, plus Canvas or WebAssembly for in-page computation. acronym never made it into HTML5 — use abbr with a title attribute. dir for directory listings became just a ul. Presentational attributes such as align, bgcolor, width on block elements and border on tables are all non-conforming; move every one of them into CSS.

When you inherit a codebase full of these tags, add an automated check. HTML validators report obsolete elements as errors, and a lint step that fails the build on center, font or marquee prevents new ones from sneaking in while the backlog is still being cleared.

Migration checklist and common mistakes

Work through legacy markup with this order in mind: inventory deprecated tags, map each to its semantic replacement, reproduce appearance in CSS, verify at three viewport widths with a screenshot diff, then improve semantics and accessibility on top of the stable visual baseline. Announce the change to anyone who owns content templates so the old patterns do not return through the CMS.

Common Mistakes

Refonting text with inline style attributes after removing the font tag

Fix: Introduce a class and style it in your stylesheet; inline styles recreate the same maintenance problem in a different syntax.

Replacing marquee with an infinite CSS animation and calling it accessible

Fix: Provide a pause control or honor prefers-reduced-motion, and keep the moving text out of live regions unless it truly updates.

Swapping strike for del everywhere by habit

Fix: Use del only for editorial deletions; use s for text that is simply no longer accurate.

Converting a layout table to divs without reproducing spacing, then blaming CSS for the collapse

Fix: Recreate the spacing with grid gap or flex gap and explicit dimensions, and compare screenshots at each step.

Migrating whole pages in one pull request with visual changes mixed in

Fix: Do a mechanical pass that preserves pixels first, then a separate pass for design improvements reviewers can evaluate.

Leaving obsolete tags in old blog posts because nobody visits them

Fix: Run a one-time script across archived content; validators and crawlers still see those pages, and fixes are cheap when automated.

Key Takeaways

  • Deprecated elements still render because browsers prioritize compatibility, not because the tags are acceptable in new work.
  • Every presentational tag has a CSS equivalent: center becomes auto margins, font becomes classes, marquee becomes a guarded animation.
  • Semantic pairs matter: del versus s, code versus tt, abbr versus acronym each carry meaning screen readers and search engines rely on.
  • Layout tables and framesets migrate cleanly to CSS Grid or Flexbox with landmark elements for orientation.
  • Refactor in two passes — mechanical replacement that preserves the pixels, then deliberate design cleanup — so regressions are easy to spot.
  • Automated validation in CI keeps obsolete markup from creeping back while older templates are still being retired.
CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-12

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Need Expert Web Development Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement