+ 1
why do I need <br />
why do I need <br /> in the flowing? <table border="2"> <tr> <td>Red</td> <td>Blue</td> <td>Green</td> </tr> <tr> <td><br /></td> <td colspan="2"><br /></td> </tr> </table>
3 odpowiedzi
+ 1
In HTML, the <br> tag is used for line break. It is an empty tag i.e. no need to add an end tag. Writing <br> tag is perfectly fine.
Let’s see the usage of other br tags i.e. <br/> or <br />,
In HTML, use <br> tag.
In XHTML, the valid way is to use <br/> or <br></br> as mentioned in the XHTML guidelines.(https://www.w3.org/TR/xhtml1/#h-4.6)
According to w3 guidelines,(https://www.w3.org/TR/xhtml1/#guidelines) a space should be included before the trailing / and > of empty elements, for example, <br />. These guidelines are for XHTML documents to render on existing HTML user agents.
0
looks same to me with or without <br />
0
<br/> means line break.