HTML CSS examples for HTML Tag:ul
The ul element creates unordered lists.
Items in the ul element are denoted using the li element.
The ul Element summary
Item | Value |
---|---|
Element | ul |
Local Attributes | None |
Contents | Zero or more li elements |
Tag Style | Start and end tag |
New in HTML5 | No |
Changes in HTML5 | The type and compact attributes are obsolete |
Style Convention
ul { display: block; list-style-type: disc; margin-before: 1em; margin-after: 1em; margin-start: 0; margin-end: 0; padding-start: 40px; }
Using the ul Element
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> I like: <!--from w w w .j a v a2 s .co m--> <ul> <li>CSS</li> <li>HTML</li> <li>Code</li> <li>Java</li> <li>SQL</li> <li>C</li> </ul> </body> </html>