1. SEJ
  2.  ⋅ 
  3. News

WordPress 5.3 Moves Closer to Valid HTML

WordPress logo with the words, Closer to Valid HTML

WordPress announced that version 5.3 will use improved coding that will be closer to standards compliant HTML. There are good reasons why it valid HTML should be considered important for SEO.  While the WordPress HTML will not be 100% valid, this update is a step in the right direction.

The release date is tentatively scheduled for November 12, 2019. For many this might seem like too little and too late. Nevertheless, WordPress is arguably the most important content management system at the moment. This means that attaining valid HTML for a website is closer now for a great many sites across the web.

WordPress 5.3 Fixes Type Attribute Issue

The improvement is focused on how script and style tags are coded. Prior to HTML5, it was mandatory to use the “type” attribute to tell browsers that the script or style was text.

HTML5 eliminated the need for the “type” attribute. The change caused HTML5 sites that continued using the “type” attribute to render as invalid HTML.

Different Levels of Validation Messages

There are different levels of validation messages. There are warnings, which are considered relatively minor and there are errors, which are more important.

This coding error resulted in a validation warning but did not trigger an error message. Perhaps because it was seen as a harmless oversight the invalid code continued to be present in WordPress.

Official WordPress Announcement

This is how the official WordPress announcement described what is changing in version 5.3:

“In HTML5, the type attribute is not required for the <script> and <style> tags. Including the attribute on these tags (type="text/javascript", for example) will trigger a validation warning in HTML validation tools.

In WordPress 5.3, two new arguments are now supported for the html5 theme feature, script and style. When these arguments are passed, the type attribute will not be output for those tags.”

Why HTML Validation Matters

HTML is a programming language with rules. Initially, bots and browsers functioned best when the rules were followed. But developer demands outpaced the rules. So developers bent the rules.

Search engines and browsers needed the content so developers adapted to non-conforming HTML.

Yet, the best way to communicate data has always been to give the browsers and search engines valid HTML because when you follow the rules there is less chance of a mistake happening.

The essence of SEO, the heart of it, is to communicate information to users and search engines.

Anything that muffles your message, that makes it harder to understand your message, works against you. Invalid HTML works against your message.

Poor HTML markup does not necessarily block your message (although in certain cases it can). But it does makes it harder to communicate it.

Type Attribute Issue is Commonly Downplayed

Many in the publishing and SEO community regard the type attribute warning as a minor issue. In a discussion thread from 2017, a senior member of WebmasterWorld observed:

“Also note that it’s flagged as a “warning”, not as an “error”. That means nothing bad will happen even if you leave it unchanged; it’s more of an FYI.”

Screenshot of a webmasterworld forum member downplaying the type attribute validation warning

That member’s attitude of downplaying the invalid code is common throughout the industry and with good reason.

As long as Google can overlook it then this kind of problem can go unfixed. There is always something more important to focus on than a seemingly minor HTML coding error.

But there’s more to this issue in the form of what’s known as browser quirks mode.

Valid WordPress HTML Code is Important to SEO

Another member pointed out that invalid code has the potential to trigger what’s known as “quirks mode” in a browser.

Quirks mode is when a browser begins trying to interpret the invalid code in a manner that may result in a useful web page. It’s a way to compensate for bad code.

Quirks mode can cause unpredictable web page rendering and in unlucky circumstances result in a web page that does not function correctly.

This is the reason why maintaining valid HTML code is important for SEO. Part of good SEO is controlling for every aspect of how a web page renders for users and for bots.

In general, invalid code has the potential to cause a cascading series of errors that can impact speed, conversions, bounce rates and even indexing.

The potential is widely considered remote, but it can’t be ruled out.

All it takes is a script or a plugin to play badly with another script (while the browser is in quirks mode), to cause unintended consequences.

Even though the above scenario may be remote, it’s a good practice to lock down every factor that contains a potential for error. That’s good SEO.

Screenshot of a webmasterworld forum discussion.

WordPress 5.3 HTML Improvement is Important

I asked HTML and SEO expert Edward Lewis for his thoughts on WordPress fixing the type attribute error:

“It is a BIG deal. It will eliminate a gajillion warnings from validation routines. Some sites will now go green and be 100% valid since they’ve failed to heed the warnings.”

I agree with Edward Lewis. WordPress finally removing the “type” attribute in <script> and <style> tags is indeed a big deal.

WordPress Ticket Timeline

The WordPress development team has been aware of this issue since almost two years ago. A WordPress ticket was opened 23 months ago about this issue.

About three months ago Sergey Biryukov (@SergeyBiryukov)  appeared to take notice and about four weeks ago updated the status of the ticket.

Screenshot of a WordPress development ticket

WordPress 5.3 Contains Many Improvements

The improvements coming in WordPress version 5.3 aren’t limited to this one fix. There are numerous changes in WP 5.3 that may be important to developers.

But this change will directly affect publishers, developers and those in the SEO community.

It’s encouraging to see the WordPress development team pushing WordPress that much closer to outputting valid HTML code. WordPress 5.3 will be good for publishers and for SEO.

Read the announcement here:

More Resources

Category News WordPress
SEJ STAFF Roger Montti Owner - at

I have 25 years hands-on experience in SEO and have kept on  top of the evolution of search every step ...

WordPress 5.3 Moves Closer to Valid HTML

Subscribe To Our Newsletter.

Conquer your day with daily search marketing news.