Ash
Ash

Reputation: 23

How to re-write <html> tag on platforms that don't allow it?

I'm on a platform that meets the requirements of Google AMP except for one in particular; I can't rename the <html> tag. It seems like an arbitrary requirement compared to everything else, so I'm hoping there's some way of indicating to Google it is an AMP page without modifying it.

Has anyone successfully worked around re-writing the opening tag?

Upvotes: 0

Views: 58

Answers (1)

bluemwhitew
bluemwhitew

Reputation: 390

Unfortunately, the opening html tag must contain either the or amp attribute in order to become a valid AMP page.

Unless the AMP HTML Specification changes, I doubt what you're trying to achieve is possible, unless the page is pre-processed where you could manipulate the opening <html> tag with preg_replace (or similar), though this is by no means an elegant solution.

Resources

Upvotes: 1

Related Questions