HTML Obsolete Elements: Semantic Migration
Preserve meaning when replacing old tags
Obsolete elements may still render for compatibility, but new documents must use conforming markup. Replace font with CSS on an appropriate element. Here the text is a status label, not an instruction to emphasize every word. Use a class for its presentation.
<style>.status { color: #14532d; font-size: 1.25rem; }</style><p> Status: <span class="status">Ready</span></p>The status remains text, styled in green.
Replace layout elements with CSS
The old center element mixed layout with document structure. Center text with text-align; center a fixed or constrained block using inline auto margins instead. Choose a real heading when the text introduces a section.
<style> .notice { max-width: 24rem; margin-inline: auto; text-align: center; }</style><section class="notice"> <h2>Library hours</h2> <p>Open on weekdays.</p></section>The section has a heading and centered text.
Retire motion and frame-based navigation
Do not recreate marquee movement by default: static announcements are easier to read. Replace frameset and frame navigation with a regular document, links, and CSS layout. An iframe can still embed a separate document when genuinely needed, but it is not a replacement for a whole site architecture.
<nav aria-label="Library"> <a href="#news">News</a></nav><main> <h1 id="news">Library news</h1> <p>New books arrive Friday.</p></main>The announcement is static and reachable through a regular link.
Common mistakes and practice
Audit the old page before editing: identify content, reading order, link destinations and interaction. Replace one pattern at a time, compare visual and semantic behavior, and test keyboard navigation. Do not automatically replace strike with del: use del for document edits, s for no-longer-accurate content, or CSS for purely decorative presentation. Browser rendering is not evidence of conformance.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
HTML Obsolete Elements: Semantic Migration — Knowledge Check
Apply the legacy migration and compatibility concepts taught in this lesson.
Why may obsolete font still render?
What replaces purely visual font color?
What centers a constrained block itself?
What is the preferred replacement for a site frameset?
When is del the correct replacement for strike?