+ 5
How to add ordering to definition list in HTML?
I was wondering if we can add ordering to definition list, similar to ordered list? You may suggest using css, but I am interested if there is a trick in HTML itself for doing that.
4 Answers
+ 4
what you are suggesting is a useful technic but it doesn't answer my question.
+ 3
Definition lists are not designed to be ordered (neither numbered), basically...
Anyway, <dl>, <dt> and <dd> elements can have or can be nested and mixed with <ol> (or even <ul>, obviously) elements:
<dl>
<dt>title</dt>
<ol>
<li><dd>definition</dd></li>
<li><dd>definition</dd></li>
<li><dd>definition</dd></li>
</ol>
</dl>
<dl>
<ol>
<li>
<dt>title</dt>
<dd>definition</dd>
</li>
<li>
<dt>title</dt>
<dd>definition</dd>
</li>
<li>
<dt>title</dt>
<dd>definition</dd>
</li>
</ol>
</dl>
You have just to use Css to design it at your convenience ;P
0
You can use list-style-type in css to style your list:
https://www.w3schools.com/cssref/pr_list-style-type.asp
I hope that can help you
0
Sorry, if think I didn't understand your question, you can try with the before selector example :
<ul>
<li>MENU</li>
</ul>
and then use a ul li:before in your css and stylised it to make what you want (like a point on the left of the li for example)