Reputation: 3956
I think the answer is probably "no," but I wanted to get the opinion of people who know a lot more than me. Can you use the "id" attribute with HTML elements in the head section, such as title or link? The purpose would be to change their values with JavaScript. Thanks in advance.
Upvotes: 3
Views: 1903
Reputation: 14649
The id
attribute is a Global Attribute
Yes, you can use an id
attribute in a head
element. Further, here is the full list of Global Attributes and they may be specified on all HTML elements.
Upvotes: 1