Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7946287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:06:25+00:00 2026-06-04T01:06:25+00:00

In HTML5 is it still appropriate to close a <br> tag with <br />

  • 0

In HTML5 is it still appropriate to close a <br> tag with <br />?

This obviously also applies to all other single tags. I realize this doesn’t actually affect how stuff works, but what is best practice here?

someLines of txt <br>            // How you see a lot of people doing it
and then some <br />             // XHTML style! Should I still be doing this? 
ow im not done yet.. <br> </br>  // No one does this right? RIGHT?!
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:06:27+00:00Added an answer on June 4, 2026 at 1:06 am

    From the W3C specification for HTML:

    • The following is a complete list of the void elements in HTML:

      • area, base, br, col, command, embed, hr, img, input, keygen, link, meta, param, source, track, wbr
    • Void elements only have a start tag; end tags must not be specified for void elements.

    • Start tags consist of the following parts, in exactly the following order:

      • A < character.
      • The element’s tag name.
      • Optionally, one or more attributes, each of which must be preceded by one or more space characters.
      • Optionally, one or more space characters.
      • Optionally, a / character, which may be present only if the element is a void element.
      • A > character.

    From this it seems that we can use either <br> or <br/>. However, the end tag </br> is not valid, so don’t use <br> </br>.

    Running the following through the HTML Validation Service indicates as much.

    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="utf-8">
      <title>Testing void elements</title>
    </head>
    <body>
        some lines of txt <br>
        and then some more <br />
        I'm not done yet... <br> </br> <!-- This line generates an error -->
    </body>
    </html>
    

    So use either <br> or <br/>, just make sure you use them consistently.

    Edit: As noted by Brad, <br /> is also valid XHTML, so perhaps it is best to choose this form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm still learning HTML5 so I understand I need the shim in there, so
I'm still new to HTML5 but I faced a very strange behavior. (In Chrome)
There are still discussions and doubts about whether <figcaption> would stay in HTML5 or
Okay, this may be a silly question but I'm still on my path to
i.e. - <form action=http://192.168.1.20/form_action.asp method=get> vs. ( without a specific handler, still valid html?
my html file loaded in webView but still without font my font has Unicode
HTML 5 has interesting features for developer and user, but if customers are still
So far I can understand HTML.ActionLink and URL.RouteURL but still trying to absorb where
HTML5 WebWorkers look very promising but at the moment they're not supported by IE8.
HTML5 will be next super star. So~~~How to using new idea to implement AJAX

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.