Am I required to have <br/> on this type of code?

Am I required to have <br/> on this type of code cause without it it’s uneven.

Without <br/>

With <br/>

Please will you check your links, as neither example includes <br/> tags.

You are not “required” to use <br/> ever. It is generally used in things like addresses or poems, where you want to make text start on a new line without creating a new paragraph or similar.

If you are using it simply to try to control the layout, then you are misusing it. Padding and/or margins are the way to do that.


thank you.

1 Like

OK. I don’t see any difference between the two, in terms of layout.

HTML elements are either “block” or “inline” by default. Inline elements - like <img> or <span> - will display all on the same line by default, whereas block elements will always start a new line of their own.

<div> and <object> fall into this latter category, so there is no need to add a <br/> tag to force them onto a new line - it will happen naturally.

1 Like

You question was about whether you should have <br/> tags in there. Before we get to the differences in appearance, please re-read my first post in this thread, and then tell me whether you thiink they should be there or not.

1 Like

I just sent ronpat a message, hopefully he’ll know the answer to this. or maybe someone else on here will.

I have given you the answer in posts #2 and #8.

(Also, if members are around and wish to contribute to a topic, then they will do so. Sending them messages for help is more likely to irritate them than encourage them to respond. Everyone here is a volunteer, and we all have other things to do with our lives. Please remember that.)


but then it messes up the whole layout.

And I’ve given you the answer to that in post #2, as well.


I want a second opinion.

The post has 4 likes so far.

No one needs to repeat what has already been said, but can show their agreement using Like.


This element must be used only for line breaks that are actually part of the content:

  • poems
  • addresses

I think I solved it.

I added this to it instead:

h3 {
color: #BA4B49;

You’re hard work, aren’t you? You ask vague questions and are given an answer to the best guess that anyone can come up with. And then you question the answer you’re given!


I just figured it out on my own.

Deep joy.


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.