• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.
    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Efficient Alternative to <Br> <Br> <Br>

gothictrade

Coder
Feb 2, 2020
63
19
8
Is there an alternative I can type for say, 5 line breaks that doesn't require me typing <br> five times? I feel like its sloppy I don't like how it looks..

Thank you~
 

Master Yoda

Administrator
Administrator
Verified
Jan 2, 2018
1,717
431
95
Canada
codeforum.org
Are you using a paragraph tag? If so, try styling the tag and adjusting the height weight with CSS. If you can, can you please share your code?
 

gothictrade

Coder
Feb 2, 2020
63
19
8
Are you using a paragraph tag? If so, try styling the tag and adjusting the height weight with CSS. If you can, can you please share your code?
Ah~
Basically I wanted to know if there was a way to make, say, five line breaks with one code item, instead of <br> x5. Kind of like a <br +5> type of thing I am imagining in my head, haha.
I do use paragraph tags so it could be like

Code:
<p><strong> Music </strong>
<br> Lana Del Rey
<br> Grimes
<br> The Strokes
<br> Rolling Stones
<br>
<br>
<br>
<br>
<br> Taylor Swift
</p>
with something to do the same thing as <br> x5, without typing <br><br><br><br><br> it just looks messy to me haha.
 

gothictrade

Coder
Feb 2, 2020
63
19
8
It looks like you're trying to create a list, is that right?
In this case a list, but in other cases I would also like to have a similar thing, creating x5 or x7 or x8 line breaks, and I wanted to know how to input that with one line of code ^-^
 

Master Yoda

Administrator
Administrator
Verified
Jan 2, 2018
1,717
431
95
Canada
codeforum.org
For the list, look into the Unordered list or ordered list (research is the best way to learn, look up those keywords).
Or (not recommended)
Unordered list
HTML:
<ul>
    <li>unordered list</li>
    <li>list item</li>
    <li>another list item</li>
</ul>
Ordered list (with numbers usually)
HTML:
<ol>
    <li>1</li>
    <li>2</li>
    <li>3</li>
</ol>

Try taking out <br> and using <p> and us <br> only when needed. Or may try using <br style = “line-height:x;”><br> and replace x with how many lines you want to break.
 
Last edited: