Mobile app version of vmapp.org
Login or Join
Correia994

: Why doesn't work with in structured testing tool? Is there any good reason why using <base href="https://example.com/"/> causes structured data testing tool (SDTT) errors to fly from alternate

@Correia994

Posted in: #Html #Xhtml

Is there any good reason why using <base href="https://example.com/"/> causes structured data testing tool (SDTT) errors to fly from alternate links such as <link rel="alternate" href="this.html"/>?

Simplistic example, try running this through it...should fail:

<!DOCTYPE html>
<html dir="ltr" lang="en">
<base href="https://example.com/" />
<link rel="alternate" href="this.html"/>
</head>
<body>
</body>
</html>


Then running this through it should work (reporting no structured data):

<!DOCTYPE html>
<html dir="ltr" lang="en">
<base>https://example.com/</base>
<link rel="alternate" href="this.html"/>
</head>
<body>
</body>
</html>


Some thoughts: www.w3schools.com/tags/tag_base.asp (we use <base />, so its HTML version)


Differences Between HTML and XHTML


In HTML the <base> tag has no end tag.
In XHTML the <base> tag must be properly closed.



Compared to: www.w3schools.com/tags/tag_link.asp which seems to have the paradox logic (as in, all we use is HTML version <link /> with non issue, except when combined with rel="alternate")


Differences Between HTML and XHTML


In HTML the <link> tag has no end tag.
In XHTML the <link> tag must be properly closed.



Is the use of rel="alternate" that strict and must be XHTML compliant or something?

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Correia994

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme