TYPE, START and VALUE are attributes of which tag in HTML?
2022
TYPE, START and VALUE are attributes of which tag in HTML?
Answer: A. <OL> — HTML gives numbering-related attributes only to markup that keeps a running numeric or alphabetic count. Of the list-type elements, only the ordered list —…
- A.
<OL> - B.
<UL> - C.
<DL> - D.
<LL>
Attempted by 712 students.
Show answer & explanation
Correct answer: A
HTML gives numbering-related attributes only to markup that keeps a running numeric or alphabetic count. Of the list-type elements, only the ordered list — <ol> — maintains such a sequence, so HTML documents the sequence-control attributes type and start on <ol> itself, together with a matching value attribute on its <li> children so a single item can override the running count.
Applied to this item, three numbering-control attributes are involved:
type— chooses the numbering style (1, A, a, I, or i); defined on<ol>.start— sets the number the list begins counting from; defined on<ol>.value— used on an individual<li>(only meaningful inside an<ol>) to jump the count to n at that item.
All three exist purely to control the ordered-list numbering mechanism, so reference documentation for <ol> (for example HTML5 Doctor's article "The ol Element and Related Attributes: type, start, value, and reversed") presents them together as the ordered list's attribute set.
<ol type="A" start="3">
<li>Item C</li>
<li value="10">Jumps to J</li>
</ol>This markup validates under the HTML Living Standard and shows all three attributes acting on the same ordered list.
<ul>renders an unordered, unnumbered list, so it defines none oftype,start, orvalue.<dl>renders a description list of<dt>/<dd>term–definition pairs with no numeric sequence at all, so none of the three attributes apply to it either.<LL>is not an element defined anywhere in the HTML specification, so it cannot carry any attribute.
Therefore, TYPE, START and VALUE are attributes associated with the <OL> tag — no other offered tag has a numbering sequence for any of them to control.
A video solution is available for this question — log in and enroll to watch it.