I want to break line <br/>
inside a <li>
Like:
but when doing so (both labels)- I get a space between them. margin and padding is 0 but still I get it.. any idea how to get rid of it? Thanks!
The <br> HTML element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
Also called "EOL" (end-of-line), "newline," and "hard return," a line break code is generated when the Enter key is pressed, When typing a command on a command line, pressing Enter executes the command. When typing text, pressing Enter signifies the end of the paragraph, and subsequent text goes to the next line.
You can split a string by line breaks into a list with the string method, splitlines() . In addition to \n and \r\n , it is also splitted by \v (line tabulation) or \f (form feed), etc. See also the following article for more information on splitlines() . Split strings in Python (delimiter, line break, regex, etc.)
To create space between list bullets and text in HTML, use CSS padding property. Left padding padding-left is to be added to <ul> tag list item i.e. <li> tag. Through this, padding gets added, which will create space between list bullets and text in HTML.
This is a simple solution...
by adding a <br/><br/>
in your <li>
will add a blank line break directly underneath
<ul> <li>Line 1<br/><br/></li> <li>Line 2</li> <li>Line 3</li> <li>Line 4<br/><br/></li> <li>Line 5</li> </ul>
You can alter the line-height
property in your css. Does that help ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With