<li>
TagsMy question is when you have a <li>
tag which states the definition of words , like
<li>
markup language - a set of tags and/or a set of rules for creating tags that
can be embedded in digital text to provide additional information about the
text in order to facilitate automated processing of it, including editing and
formatting for display or printing.
</li>
Should that definition be inside a <p>
tag or is it fine the way it is?
And my last question is, should my <li>
tag be written on a single line?
<li>dog - a domestic mammal that that can be a variety of breeds</li>
Or, with line breaks?
<li>
dog - a domestic mammal that that can be a variety of breeds
</li>
HTML has specific tags for definitions (dl
, dt
, dd
), which you could use instead. If you're asking about the syntax specifically, it doesn't really matter, as long as you're consistent and keeping up with your current code's standards.
Furthermore, your choice to use a nested p
tag depends on the amount of content and styling you need for the definition, there's no one single "best practice."