HTML 5 <ul> tag
Definition and Usage
The <ul> tag defines an unordered list.
Differences Between HTML 4.01 and HTML 5
The "compact" and "type" attributes of the ul element were deprecated
in HTML 4.01, and are no longer supported in HTML 5.
Tips and Notes
Tip: Use CSS to define the type of list.
Example
Source |
Output |
<ul>
<li>Coffee</li>
<li>Tea</li>
</ul> |
|
Attributes
- 4: indicates if the attribute is defined in HTML 4.01
- 5: indicates if the attribute is defined in HTML 5
Attribute |
Value |
Description |
4 |
5 |
compact |
compact_rendering |
Not supported. Use CSS instead |
4 |
|
type |
disc
square
circle |
Specifies the type of the list. Not supported. Use CSS instead. |
4 |
|
Standard Attributes
class, contenteditable, contextmenu, dir, draggable, id,
irrelevant, lang, ref, registrationmark, tabindex, template, title |
For a full description, go to Standard
Attributes in HTML 5.
Event Attributes
onabort, onbeforeunload, onblur, onchange, onclick,
oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave,
ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress,
onkeyup, onload, onmessage, onmousedown, onmousemove,
onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect,
onsubmit, onunload |
For a full description, go to Event Attributes
in HTML 5.
Try-It-Yourself Demos
An unordered list
An unordered list.
A nested list
A nested list.
Another nested list
A more complicated nested list.
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|