List with a blue left border using CSS

CSSWeb DevelopmentFront End Technology

To add a blue left border to a list in CSS, you can try to run the following code −

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         ul {
            border-left: 3px solid blue;
            background-color: #gray;
         }
      </style>
   </head>
   <body>
      <p>Countries</p>
      <ul>
         <li>India</li>
         <li>US</li>
         <li>Australia</li>
      </ul>
   </body>
</html>

Output

raja
Published on 08-May-2018 09:25:17
Advertisements