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 Text Field in Input Element?

0 Answers   HCL,


What is the relation between xhtml and dtd?

0 Answers  


Is html a scripting language?

0 Answers  


How do you play tag?

0 Answers  


What are the part of html5 technologies?

0 Answers  






How many types css can be include in html?

0 Answers  


What is the purpose of HTML5 versus XHTML?

0 Answers  


What are the audio tags provided by HTML 5?

0 Answers  


How are active links different from normal links?

0 Answers  


What is html6?

0 Answers  


What is a tag for writing?

0 Answers  


What is html server?

0 Answers  


Categories