HTML Element Style How to - Remove list bullet








Question

We would like to know how to remove list bullet.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
li:nth-last-child(2) {<!--from   w  ww .j ava 2 s .  c o m-->
  list-style-type: none;
}
</style>
</head>
<body>
  <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
  </ul>
  <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
  </ul>
</body>
</html>

The code above is rendered as follows: