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

What is a td test?

0 Answers  


List out the tags those are mostly used in html?

0 Answers  


What are the essential attributes in image tag in html?

0 Answers  


What is the full form of html?

0 Answers  


What are tags used for?

0 Answers  






How do you insert a comment in HTML?

0 Answers  


Is html5 supported by all browsers?

0 Answers  


What are the new media-related elements in html5?

0 Answers  


What is tables in ms word?

0 Answers  


What is b in html?

0 Answers  


Explain about canvas.

0 Answers  


How do I create frames?

0 Answers  


Categories