<br> or <br /> or </br>
Solved
corentin.93
Posted messages
1681
Registration date
Status
Membre
Last intervention
-
jessy006 Posted messages 35 Status Membre -
jessy006 Posted messages 35 Status Membre -
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
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 réponses
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.
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.
Just to nitpick, it seems to me that a space should be placed between the "r" and the "/".