Jump to content

Unordered list


Johnny7oak

Recommended Posts

I noticed this after mistakingly typing the style format wrong in the unordered list:

 

If you do not give it disc, square, none, or circle or blank you get numbered listed.

<html>

<body>

<ul style="list-style-type:anyvalue">

<li>first numbered</li>

<li>second numbered</li>

</ul>

<body>

</html>

 

Edited by Johnny7oak
Link to comment
Share on other sites

That sounds like a browser quirk. The permitted values for list-style-type are here: https://www.w3schools.com/cssref/pr_list-style-type.asp

Usually when a browser encounters an unknown CSS value it ignores the rule, but in this case it seems to be using numbers instead. I would not rely on this behavior because it's not standard so it's not guaranteed to work like that on all browsers.

Link to comment
Share on other sites

thank you for the link to the list.  That is way more options.  I must have missed the link.

 

Is there a way to "style" formatting?>

<html>
  <title>Bold style</title>
  <head>
    <!-- found out it is font-wieght -->
<style>
  p.1bold {font-wieght:bold}
</style>
  </head>
<body>
<p class="1bold">Make me bold</p>
  </body>
</html>

 

Edited by Johnny7oak
discovered answer
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...