Is it allowed to have several title tags in html?
Question
I was looking at the title tag http://www.w3schools.com/TAGS/tag_title.asp So would it be legal if I had several titles with different lang IDs?
Solution
Simple answer: no. Only one (and exactly one) <title>
element is allowed.
Source: e.g. XHMTL 1.0 Strict DTD:
Exactly one title is required per document.
OTHER TIPS
No, HEAD
does only allow one single TITLE
element:
<!-- The TITLE element is not considered part of the flow of text.
It should be displayed, for example as the page header or
window title. Exactly one title is required per document.
-->
<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->
<!ATTLIST TITLE %i18n>
Here’s the snippet from the document type definition of HTML 4.01:
<!ENTITY % head.content "TITLE & BASE?">
<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow