0

what does "<br/ >" actually do? the lesson never explains why it uses this.

7th Jun 2017, 2:09 PM
Noah Desman
Noah Desman - avatar
7 Answers
+ 4
<br /> is meant to be used as to represent a break in said content, a common example would be an address: <p> 20 street name<br /> City Name<br /> etc. </p> As you can see in the above example, the address is all one group of content, the breaks are only for presentational purposes. In short: <p> tags should be used to seperate content into blocks, and the <br />tag should be used for any breaks needed in that content (for presentational purposes, as in the example above) Note: Use the <br/> tag to enter line breaks, not to separate paragraphs Tip: The <br/> tag is useful for writing addresses or poems
7th Jun 2017, 2:19 PM
Rishabh Joshi
Rishabh Joshi - avatar
+ 8
<br /> creates a line-break <p>My name is<br /> XYZ<p> output :- My name is XYZ
7th Jun 2017, 2:14 PM
Ekansh
+ 7
Before asking a question, search the application and see whether an answer to your question has already been posted. One of the rules of etiquette is to show that you have conducted some research before posting a question.
7th Jun 2017, 3:45 PM
Ekansh
+ 3
A concept/rule you need to first accept: ** HTML ignores ALL whitespace ** word1{tab}{tab}{tab}word2{enter} word3{space}{1000 spaces}word4 produces: word1 word2 word3 word4 Because HTML is a "markup" language; you're not supposed to FORCE formatting...instead you should use tags like <pre>, <code> and positioned <div>...but if you insist: ...you use <br /> to force "hard" line breaks (&nbsp; for "non-breaking" spaces, fyi). They break (as in override) engine decisions; try not to rely on forced behavior in production.
7th Jun 2017, 2:45 PM
Kirk Schafer
Kirk Schafer - avatar
+ 2
you tagged #javascript #loop why?
7th Jun 2017, 4:16 PM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 1
Create a line break
7th Jun 2017, 2:29 PM
Jérémie Agossouvi
Jérémie Agossouvi - avatar
0
<br> is a standalone tag So you can code <br> and/or </br>
7th Jun 2017, 7:49 PM
StoffelJs