Find & Fix Deprecated HTML Tags in DevTools
In this article
Open your browser's DevTools (F12 or right-click → Inspect), go to the Console panel, and look for warnings that mention deprecated or obsolete tags—those messages point you to the exact line. Then use the Elements panel to locate the tag in the DOM, replace it with the modern equivalent, and reload to confirm the warning is gone.
What Deprecated HTML Tags Are
Deprecated tags are elements that the HTML specification has marked as outdated, meaning they may still work in some browsers but are no longer recommended and could break in future versions. Examples include <center>, <font>, <marquee>, and <frame>. The HTML Living Standard (maintained by the WHATWG) and W3C HTML specifications list these as obsolete, and browsers often log console warnings to alert developers.
Deprecated is different from obsolete: a deprecated feature is discouraged but still supported, while an obsolete one has been removed and may not work at all. For instance, <center> is obsolete in HTML5, but browsers still render it for backward compatibility—which is why you might not notice the problem until you check the console.
How to Detect Deprecated Tags Using DevTools
The Console panel is your primary tool. When a page uses a deprecated tag, Chrome, Firefox, and Edge typically log a message like “The <center> tag is obsolete. Use CSS text-align instead.” The message usually includes a link to the source file and line number.
- Open DevTools (F12 or Ctrl+Shift+I on Windows/Linux, Cmd+Option+I on Mac).
- Click the Console tab.
- Look for yellow or orange warning messages—deprecation warnings often appear there.
- Click the file link in the message to jump to the source in the Sources panel.
- Use the Elements panel to inspect the tag in the live DOM and see its context.
If the console is empty, try reloading the page (F5) with DevTools open. Some deprecation warnings only appear during page load. You can also filter the console by typing deprecated in the filter box to isolate relevant messages.
Using the Elements Panel to Locate the Tag
The Elements panel (called Inspector in Firefox) shows the rendered DOM. Press Ctrl+F (or Cmd+F) while in the Elements panel and type the tag name, like font, to find all instances. This is useful when the console warning doesn't give a clear source location, or when you want to see all occurrences at once.
Right-click on the highlighted tag and select Scroll into View to see it on the page. You can also copy the outer HTML to edit it in your source code. Remember that DevTools shows the live DOM, which may include JavaScript-generated tags—so a tag you see might come from a script, not your static HTML.
How to Fix Deprecated Tags
Once you've identified the tag, replace it with the modern equivalent. Here are common replacements:
<center>→ use CSStext-align: centeron the parent ormargin: autowith a width for block elements.<font>→ use CSSfont-family,font-size, andcolorproperties.<marquee>→ use CSS animations (like@keyframes) or JavaScript libraries.<frame>and<frameset>→ use<iframe>or modern layout techniques like flexbox or grid.<big>and<small>→ use CSSfont-size.<strike>→ use<del>for deleted text or CSStext-decoration: line-through.
After editing your source files, reload the page and check the console again. The warning should disappear. If you're using a CMS or framework, the tag might be generated by a plugin or theme—search your template files for the tag name.
Common Problems and Misconceptions
One common misconception is that deprecated tags are harmless because they still render. While they may look fine today, they can cause accessibility issues (e.g., <font> doesn't adapt to user settings) and may break in future browser updates. Another issue is that some deprecation warnings are not actually about HTML tags but about APIs—like window.alert or localStorage—so read the message carefully.
Another problem: the console might not show deprecation warnings if you're using an older browser version. Modern browsers (Chrome, Firefox, Edge, Safari) all log these, but the wording differs. If you see no warnings, try opening the page in a different browser or using a validator like the W3C Markup Validation Service to cross-check.
Comparing Browsers: Chrome, Firefox, Edge, Safari
All major browsers support DevTools with similar features, but the exact menu labels vary. In Chrome and Edge, the panel is called Elements; in Firefox, it's Inspector. The Console is named the same in all. Safari requires enabling the Develop menu (Preferences → Advanced → Show Develop menu) before you can access DevTools via Cmd+Option+C.
Deprecation warnings also differ: Chrome and Edge use the term “deprecated” frequently, while Firefox might say “obsolete.” The underlying fix is the same regardless of browser. For cross-browser consistency, always validate your HTML with the W3C validator, which lists all deprecated tags regardless of browser.
Frequently Asked Questions
Why don't deprecated tags show up in the console?
Some browsers only log deprecation warnings for tags that are actually obsolete, not just deprecated. Also, if the tag is generated by JavaScript after page load, the warning might appear only when that script runs. Try reloading with DevTools open, or use the Elements panel to search for the tag manually.
Can I ignore deprecated tags if my site works fine?
You can, but it's risky. Future browser updates may remove support entirely, breaking your layout. Also, deprecated tags often hurt accessibility and SEO. It's best to fix them when you find them, especially if the fix is a simple CSS change.
Do deprecated tags affect SEO?
Search engines don't directly penalize deprecated tags, but they can affect user experience and page speed, which indirectly impacts rankings. For example, <marquee> can distract users and increase bounce rate. Clean, modern HTML is generally better for SEO.
What's the difference between deprecated and obsolete?
Deprecated means the feature is still supported but discouraged; obsolete means it has been removed from the specification and may not work. In practice, browsers often support obsolete tags for backward compatibility, but you should treat both as “replace me.”
How do I fix deprecated tags in WordPress?
If the tag appears in your theme or a plugin, edit the corresponding PHP file. Use a child theme to avoid losing changes on updates. Search the theme files for the tag name, replace it with the modern equivalent, and test on a staging site first.