I'm wondering, can I put text after Li tag and will it be correct? Example
<ul>
<li>Text</li>
Text here after tag
<li>Text</li>
Text here after tag
</ul>
Writing such a code will return dots from li tags indented and that's what I want to achieve.
Regarding your screenshot - the following code does what you want
<ul>
<li>Text</li>
<span>Text here after tag</span>
<li>Text</li>
<span>Text here after tag</span>
</ul>
css
span {
margin-left: -15px;
}
And here is a fiddle: http://jsfiddle.net/P2CXF/
Note that the W3C markup validator will throw errors. The <span> tag is not allowed as child of <ul>
EDIT:
This one will validate (thank you @Ma3x)
<ul>
<li>Text<br />
<span>Text here after tag</span></li>
<li>Text<br />
<span>Text here after tag</span></li>
</ul>
You can also use <p> instead of <span>.
Using <br /> instead like this:
<ul>
<li>Text<br />Text here after tag</li>
<li>Text<br />Text here after tag</li></ul>
Will produce the same effect and make a little more sense semantically if all you were intending to do was break the text down to the next line.
fiddle
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