Facebooktwittergoogle_plusredditpinterestlinkedinmail

In HTML5 Void element doesn’t require closing tags.

What are the Void Elements?
A Void element is an element that can not allow to have any content in between the start and closing tags. Void elements only have a start tag; end tags must not be specified for void elements.

Void elements:

area, base, br, col, embed, hr, img, input, keygen, link, menuitem, meta, param, source, track, wbr

For example Input tag should be close >, it should not be />
Correct:

<input type="text" name="username">

Wrong:

<input type="text" name="username" />

Source:
http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-input-element

HTML Tags which should not be closed in HTML5http://techieroop.com/wp-content/uploads/2015/10/html-tags-which-should-not-be-closed-in-html5-TechieRoop.pnghttp://techieroop.com/wp-content/uploads/2015/10/html-tags-which-should-not-be-closed-in-html5-TechieRoop-150x150.png Roopendra HTML,
In HTML5 Void element doesn't require closing tags. What are the Void Elements? A Void element is an element that can not allow to have any content in between the start and closing tags. Void elements only have a start tag; end tags must not be specified for void elements. Void elements: area,...
In <a href="http://techieroop.com/tag/html5/#.VpHo4VLkrPk" target="_blank">HTML5 </a>Void element doesn't require closing tags. <blockquote>What are the Void Elements? A Void element is an element that can not allow to have any content in between the start and closing tags. Void elements only have a start tag; end tags must not be specified for void elements.</blockquote> <strong>Void elements:</strong> <pre>area, base, br, col, embed, hr, img, input, keygen, link, menuitem, meta, param, source, track, wbr</pre> For example Input tag should be close<strong><span style="color: #000000;"> ></span></strong>, it should not be<span style="color: #000000;"><strong> /></strong></span> <span style="color: #99cc00;"><strong>Correct:</strong></span> <pre><input type="text" name="username"></pre> <span style="color: #ff6600;"><strong>Wrong:</strong></span> <pre><input type="text" name="username" /></pre> Source: <a href="http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements" target="_blank">http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements</a> <a href="http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-input-element" target="_blank">http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-input-element</a>
(Visited 176 times, 4 visits today)
Facebooktwittergoogle_pluslinkedinrss