Are quotation marks necessary for attributes?


#1

Are quotation marks necessary when coding an attribute?
Example:
div id=“banana”

Are the quotations around the word banana necessary?


FAQ: Learn HTML Elements - Intro to HTML - Attributes
FAQ: Learn HTML Elements - Intro to HTML - Attributes
#2

No, in html5 they are no longer mandatory, but i would still use them, as explained here:

https://stackoverflow.com/questions/6495310/do-you-quote-html5-attributes


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.