How to fix: Net enabling start tag not immediately followed by null end tag

Most Likely Cause and Fix

Your markup contains an incorrectly-closed self-closing element.

Use:

<img src="http://example.com/example.png" />

instead of:

<img src="http://example.com/example.png" / >

and instead of:

<img src="http://example.com/example.png"/ >

What This Means

Depending on the version of HTML your document uses, some elements do not require a specific end tag and can instead by self-closing:

<img src="http://example.com/example.png"></img> <!-- with explicit closing tag -->
<img src="http://example.com/example.png" /> <!-- self-closing -->

This error is telling you that your markup contains a self-closing element which is not closed correctly.

How To Fix It

Ensure that all self-closing elements are closed correctly.

The element should finish with a slash and a closing bracket separated from the rest of the element by a space.

Use:

<img src="http://example.com/example.png" />

instead of:

<img src="http://example.com/example.png" / > <!-- additional space between slash and closing bracket -->

and instead of:

<img src="http://example.com/example.png"/ > <!-- no space after element and before the closing slash -->

Discuss, Comment and Improve

Did this help you? Can this page be improved? Let us know!

comments powered by Disqus