Skip to main content
HTML Validation

Quote “"” in attribute name. Probable cause: Matching quote missing somewhere earlier.

About This HTML Issue

When the HTML parser encounters a tag’s attributes, it expects a specific structure: an attribute name, followed by an equals sign, followed by a quoted value. If a quote character appears where the parser expects an attribute name, it means something has gone wrong in the syntax earlier in the tag. The validator flags this as Quote """ in attribute name and suggests that a matching quote is likely missing somewhere before.

This issue matters because browsers will try to recover from the malformed HTML in unpredictable ways. One browser might ignore the attribute entirely, while another might merge it with adjacent text. This can lead to broken styling, missing functionality, or elements that behave differently across browsers. For accessibility, malformed attributes can prevent assistive technologies from correctly interpreting element semantics and roles.

There are several common causes for this error:

  • Missing equals sign between an attribute name and its value, causing the parser to treat the opening quote as part of the attribute name.
  • Extra closing quote that prematurely ends an attribute value, leaving subsequent quotes orphaned.
  • Unescaped quotes inside attribute values, which break the quoting structure of the entire tag.
  • Copy-paste errors that introduce curly/smart quotes (" ") or extra quote characters.
  • A missing closing quote on a previous attribute, causing the parser to consume subsequent attributes as part of that value.

Examples

Missing equals sign

The most common cause. Without the =, the parser sees class as one attribute and then encounters " where it expects another attribute name.

Incorrect:

<p class"news">This paragraph has broken markup.</p>

Fixed:

<p class="news">This paragraph has correct markup.</p>

Missing closing quote on a previous attribute

When a quote is left unclosed, everything after it—including other attributes—gets consumed as part of the value, until the parser eventually encounters another quote in an unexpected position.

Incorrect:

<a href="/about class="link">About us</a>

Here, the href value is never closed. The parser reads /about class= as the href value, then encounters "link" in an unexpected context.

Fixed:

<a href="/about" class="link">About us</a>

Extra quote character

A stray extra quote breaks the pairing of subsequent quotes.

Incorrect:

<div id=""main" class="container">Content</div>

Fixed:

<div id="main" class="container">Content</div>

Unescaped quotes inside an attribute value

If the attribute value itself contains a double quote, it must be escaped as &quot; or the attribute must use single quotes instead.

Incorrect:

<input type="text" value="She said "hello"">

Fixed (using &quot;):

<input type="text" value="She said &quot;hello&quot;">

Also fixed (using single quotes for the attribute):

<input type="text" value='She said "hello"'>

Smart/curly quotes from copy-paste

Word processors and rich-text editors often convert straight quotes to curly quotes, which are not valid for HTML attribute delimiters.

Incorrect:

<p class="highlight">Styled text</p>

Fixed:

<p class="highlight">Styled text</p>

How to debug this issue

When you see this error, the validator usually points to a specific line number, but the root cause may be on that line or earlier in the same tag. Follow these steps:

  1. Go to the line indicated by the validator and examine the full tag.
  2. Check every attribute on that element for proper name="value" syntax.
  3. Count the quotes — each attribute value should have exactly one opening and one closing quote.
  4. Look for missing = signs between attribute names and their values.
  5. Search for curly quotes (", ", ', ') and replace them with straight quotes (" or ').
  6. If the line looks correct, check the preceding lines — an unclosed quote on a previous element can cascade errors into later markup.

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?

Ready to validate your sites?
Start your free trial today.