<br> or <br /> or </br>

Solved
corentin.93 Posted messages 1681 Registration date   Status Member Last intervention   -  
jessy006 Posted messages 35 Status Member -
Hello,

Since we read various things on the internet, I would like to know which tag we should use for a line break in HTML5.

Thank you. :)

Configuration: Windows 7 / Chrome 22.0.1229.79

5 answers

  1. mpmp93 Posted messages 2931 Registration date   Status Member Last intervention   1 343
     
    Hello,

    The <br> tag is a non-container tag....

    Example of a container tag:
    <div>......</div>

    A container tag has a start marker <....> and an end marker </...>

    The writing </br> is only possible if you do <br></br>. But since there is nothing to contain, the official writing in all HTML versions is:

    <br/>

    Note that this also applies to other tags like INPUT or IMG, for example:

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

    <img src="monImage.jpg" alt="example image"/>

    or for HR

    <hr/>

    etc....

    The recommendations regarding HTML writing (all versions) should be aligned with the requirements of the XML standard:

    non-container element:

    <tag/>

    container element:

    <tag>...content...</tag>

    See you

    I do not tolerate intolerance.
    7
    1. telliak Posted messages 3652 Registration date   Status Member Last intervention   885
       
      RE,
      Just to nitpick, it seems to me that a space should be placed between the "r" and the "/".
      0