HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials
  • Insights
  • Verify Certificate
HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials
HTML5ANDCSS3 logoHTML5ANDCSS3Tools and Tutorials

HTML5andCSS3.org helps developers learn modern frontend skills with practical tutorials, production-ready snippets, and fast web tools built for everyday coding.

Quick Links

  • About Us
  • Contact Us
  • Privacy Policy
  • Copyright
  • Disclaimer

Top Tools

  • Try It Editor
  • JSON Formatter
  • CSS Minifier
  • HTML Minifier
  • Base64 Encoder / Decoder

Contact

  • business@html5andcss3.org
Newsletter

Learn at your own pace, practice with useful tools, and build websites you're proud of.

© 2011-2026 html5andcss3.org. All rights reserved.

How to Use

HTML Tutorial

HTML Basics

Introduction to HTMLHTML EditorsHTML StructureHTML Elements & AttributesHTML HeadingsHTML ParagraphsHTML FormattingHTML CommentsHTML Styles

HTML Text and Links

HTML Text FormattingHTML Quotations & CitationsHTML LinksHTML Email Links

HTML Lists and Tables

HTML ListsHTML TablesTable Styling & Borders

HTML Images and Media

HTML ImagesHTML Picture ElementHTML AudioHTML VideoHTML Embed & Object

HTML Forms

HTML Forms OverviewHTML Form ElementsHTML Input TypesHTML Input AttributesHTML Form AttributesHTML Form Validation

HTML Layout

HTML Block vs Inline ElementsHTML Div & SpanHTML Semantic Layout TagsHTML Iframes

Advanced HTML

HTML Entities & SymbolsHTML EmojisHTML Head Element TagsHTML Meta Tags for SEOHTML Responsive Design

HTML References

HTML5 New TagsDeprecated TagsHTML Global AttributesEvent AttributesComplete HTML Tag ListComplete HTML5 ElementsHTML Tutorial PDF
  1. Home
  2. /
  3. Tutorials
  4. /
  5. HTML Tutorial
  6. /
  7. Deprecated Tags

HTML References

Deprecated Tags

As HTML evolved, many tags that were once common became deprecated - meaning they are no longer recommended for use in modern web development.
Deprecated tags may still work in some browsers for backward compatibility, but they are not supported in HTML5 and can cause SEO and accessibility issues.

What Does “Deprecated” Mean?

A deprecated tag is an old HTML element that has been replaced by newer, more efficient, or semantic alternatives.
While browsers may still render them, they could be removed in future updates, so using them is not a best practice.

Example (Deprecated):

html

<center>
  <h2>This is centered text</h2>
</center>

Correct Modern Alternative:

html

<h2 style="text-align: center;">This is centered text</h2>

Common Deprecated Tags and Their Alternatives

Deprecated TagPurpose (Old)Modern Alternative
<acronym>Defines an acronym<abbr>
<applet>Embeds a Java applet<object> or <embed>
<basefont>Sets default font for a pageUse CSS (font-family, font-size)
<big>Displays large textUse CSS (font-size)
<center>Centers contentCSS (text-align: center;)
<dir>Creates a directory list<ul>
<font>Sets font size, color, faceCSS (font-family, color, font-size)
<frame>, <frameset>, <noframes>Divides window into frames<iframe> or modern layouts (CSS Grid/Flexbox)
<isindex>Creates a search field<input type="search">
<menuitem>Defines a command menu item<button> or <li>
<s>Strikethrough text<del> (for older docs)
<strike>Draws a line through text<del> or CSS (text-decoration: line-through;)
<tt>Monospaced (teletype) text<code> or <pre>
<u>Underlined textCSS (text-decoration: underline;)
<xmp>Displays preformatted text<pre> or <code>

Deprecated Attributes (Also Avoid These)

AttributeDeprecated FromModern Replacement
align<p>, <div>, <img>CSS (text-align, float)
bgcolor<body>, <table>CSS (background-color)
border<table>CSS (border)
height, width<img>, <table>CSS (width, height)
hspace, vspace<img>CSS (margin, padding)
nowrap<td>CSS (white-space: nowrap;)
valign<td>CSS (vertical-align)

Why Avoid Deprecated Tags

  • ❌ Poor accessibility and SEO
  • ❌ Non-responsive layouts
  • ❌ Reduced browser compatibility
  • ✅ Use CSS and semantic HTML tags instead
  • ✅ Cleaner, modern, maintainable code

Example: Updating Old HTML

Deprecated HTML:

html

<body bgcolor="lightblue">
  <center>
    <font color="red" size="5">Welcome to My Page</font>
  </center>
</body>

Modern HTML5 Version:

html

<body style="background-color: lightblue;">
  <h1 style="text-align: center; color: red; font-size: 2em;">Welcome to My Page</h1>
</body>

Tools to Check Deprecated Tags

You can check your HTML for deprecated elements using:

  • W3C Markup Validation Service: validator.w3.org
  • HTMLHint (browser plugin or npm)
  • VS Code extensions like HTMLHint or WebLint

Summary

ConceptDescription
Deprecated tagsNo longer recommended for use
Why avoid themPoor SEO, accessibility, and modern compatibility
Modern practiceUse CSS and semantic HTML
Validation toolsW3C Validator, HTMLHint

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

Conclusion

Deprecated tags are remnants of early HTML versions.
Modern web design emphasizes separation of content and style, achieved through semantic HTML and CSS.
By avoiding deprecated tags and using current standards, you create websites that are cleaner, future-proof, and search-friendly.

PreviousHTML5 New TagsNextHTML Global Attributes