HTML Attributes: Quote Attribute Values

Quote Attribute Values

  • We recommends quotes in HTML, and demands quotes for stricter document types like XHTML.
  • Using quotes are the most common. Omitting quotes can produce errors. We always use quotes around attribute values.
  • Double quotes around attribute values are the most common in HTML, but single quotes can also be used.
  • In some situations, when the attribute value itself contains double quotes, it is necessary to use single quotes. Or vice versa. <p title='John "ShotGun" Nelson'>.

Related concepts

HTML Attributes: Quote Attribute Values — Structure map

Clickable & Draggable!

HTML Attributes: Quote Attribute Values — Related pages: