Announcement

Collapse
No announcement yet.

html5 self closing tags

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    html5 self closing tags

    What is the proper way to close tags in html5 for the following elements:

    <meta> <base> <link> <img> <input> <br> <hr>

    Do you use the trailing slash?

    <meta /> <base /> <link /> <img /> <input /> <br /> <hr />

    I've read too many posts on backward compatibility and xhtml so I not sure who is right.
    http://www.alphabetsigns.com/

    #2
    Re: html5 self closing tags

    You do not need trailing slashes in html5 for self closing tags, <br> not <br />.

    But browsers need to be backwards compatible and correctly interpret tag either way.

    Resource: http://dev.w3.org/html5/spec/Overview.html
    http://www.alphabetsigns.com/

    Comment

    Working...
    X