Horje

How to set Default CSS Settings on HTML <ol> Tag

Most browsers will display the <ol> element with the following default values.

index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
ol {
  display: block;
  list-style-type: decimal;
  margin-top: 1em;
  margin-bottom: 1em;
  margin-left: 0;
  margin-right: 0;
  padding-left: 40px;
}
</style>
</head>
<body>

<p>An ol element is displayed like this:</p>

<ol>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

<p>Change the default CSS settings to see the effect.</p>
 
</body>
</html>

Output should be:

How to set Default CSS Settings on HTML <ol> Tag




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin