CSS Property Value How to - list-style-type: none;








Question

We would like to know how to list-style-type: none;.

Answer


<!DOCTYPE html>
<html>
<head>
<title>Using Before to change list style type</title>
<style type='text/css'>
ul {<!-- w w  w.  ja v a  2  s .c o m-->
  list-style-type: none;
}

ul li:before {
  content: '>';
  padding: 0 10px 0 0;
}
</style>
</head>
<body>
  <ul>
    <li>List Item 1</li>
    <li>List Item 2</li>
    <li>List Item 3</li>
    <li>List Item 4</li>
    <li>List Item 5</li>
  </ul>
</body>
</html>

The code above is rendered as follows: