Should I put quotes around attribute values or not?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are not my frames the exact size I specified?

516


What is session storage and how can you create one?

545


What language is html?

517


How do you spell lable or label?

531


What is the difference between linking to an image, a website, and an email address?

866






How do you change the number type in the middle of a list?

561


How we can create dropdown list control in html?

545


What is a footer code?

559


Explain about canvas.

554


Why we use xhtml instead of html?

486


What is a hyperlink? Does it only apply to text?

580


What are the benefits of html?

486


What is p in html?

501


What is html and how is it used?

507


What is the lifetime of local storage?

549