0
what does "<br/ >" actually do? the lesson never explains why it uses this.
7 Antworten
+ 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
+ 8
<br /> creates a line-break
<p>My name is<br /> XYZ<p>
output :-
My name is
XYZ
+ 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.
+ 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 ( for "non-breaking" spaces, fyi). They break (as in override) engine decisions; try not to rely on forced behavior in production.
+ 2
you tagged #javascript #loop
why?
+ 1
Create a line break
0
<br> is a standalone tag
So you can code <br> and/or </br>