Deprecated HTML elements — <center>, <font>, <marquee>, <frame>, <big>, <strike>, <tt> — still render in most browsers but have no guarantee. They appear most often in migrated content from old CMS installs and in templates that haven't been updated since 2010. This guide maps each deprecated element to its modern replacement and walks through bulk-fixing legacy content. For related fixes, see the HTML Checker Fixes index.
| Deprecated | Modern replacement |
|---|---|
<center>Content</center> | <div style="text-align:center">Content</div> or a CSS class |
<font color="red" size="4"> | <span style="color:red;font-size:1.2em"> or a CSS class |
<b> (when stylistic only) | <strong> (semantic emphasis) or CSS font-weight |
<i> (when stylistic only) | <em> (semantic emphasis) or CSS font-style |
<u> | <span style="text-decoration:underline"> (avoid — underline implies link) |
<strike> | <del> (semantic deleted text) or <s> (no longer accurate) |
<big> | CSS font-size |
<tt> | <code>, <samp>, or <kbd> depending on intent |
<marquee> | CSS animation or — better — remove (anti-pattern) |
<blink> | Remove. Was never serious. |
<frame>, <frameset> | <iframe> for embeds, CSS Grid/Flexbox for layout |
<applet> | <object> (Java not supported anyway) |
<acronym> | <abbr> |
HTML attributes like bgcolor, align | CSS background-color, text-align |
grep -rE "<(center|font|marquee|big|strike|tt|frame|blink)" /var/www/yoursite/wp-content/themes/your-theme/Each match is a template file that needs updating. Apply the replacement table above.
Search: <center> Replace: <div style="text-align:center"> Tables: wp_posts, wp_postmeta Dry run: yes (first), then real runRepeat for the closing tag and each deprecated element. The plugin handles serialised data correctly.
theme.liquid or specific section templates, filter rich-text output:
{{ product.description
| replace: '<center>', '<div style="text-align:center">'
| replace: '</center>', '</div>'
| replace: '<font color="red">', '<span style="color:red">'
}}
Quick fix; the real cleanup is editing each product's description in the admin panel.
UPDATE wp_posts SET post_content = REPLACE(post_content, '<center>', '<div style="text-align:center">'); UPDATE wp_posts SET post_content = REPLACE(post_content, '</center>', '</div>');
REPLACE can corrupt serialised PHP data (Yoast, Elementor metadata). Use Better Search Replace plugin for WordPress instead of raw SQL.tiny_mce_before_init with valid_elements excluding deprecated tags. Custom editors: configure allowed-element schema to omit deprecated tags.
! grep -rE "<(center|font|marquee|big|strike|tt|frame|blink)" ./src/templates/
Re-run the HTML Checker. Deprecated-element warnings should clear or drop to a handful of legacy content pieces you'll fix manually.
Verify deprecated elements are replaced with modern equivalents.
Run HTML Checker →