Should I put quotes around attribute values or not?



Should I put quotes around attribute values or not?..

Answer / guest

It depends. It is never wrong to use them, but you don't
have to if the attribute value consists only of letters,
digits, periods and/or hyphens. This is explained in the
HTML 2.0 specs.

Oh, and keep in mind that if you use double quotes, you
should escape any quotes inside the value with """ so you
don't accidentally terminate the value prematurely.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More HTML DHTML Interview Questions

Explain some of the common lists to design a web page.

0 Answers  


Is html extensible?

0 Answers  


Explain the key differences between localstorage and sessionstorage objects.

0 Answers  


How do I indent the first line in my paragraphs?

2 Answers  


What is a document tag?

0 Answers  






What is tables in ms word?

0 Answers  


What is nav code?

0 Answers  


How can I use forms for pull-down navigation menus?

0 Answers  


Explain sencha and bootstrap support with html5?

0 Answers  


What is the difference between progress and meter tag?

0 Answers  


How do I become a web developer?

0 Answers  


What is a closing tag?

0 Answers  


Categories