Home > Mobile >  How do I make a lettered ordered list in HTML using CSS Style (not using type)
How do I make a lettered ordered list in HTML using CSS Style (not using type)

Time:01-10

The question states this:

Do not use the type attribute to change the appearance of something. I know I have mentioned that in some circumstnaces it is okay. However, for this assignment - and for the course in general - remember that whenever you are changing the appearance of something (e.g. a font, color, bullet type, etc) you should always use CSS.

CREATE AN ORDERED LIST OF 3 PEOPLE, your list should use upper case letters, i.e. A, B, C, D instead of numbers.

Have to use CSS and can't use the type="A" attribute tag.

Tried list-style but not sure what to use.

CodePudding user response:

This should be achievable with the list-style-type CSS property. Try out this code below, and see if this is working how you would like:

.name-list {
  list-style-type: upper-alpha;
}
<ol >
  <li>Bill</li>
  <li>Steve</li>
  <li>William</li>
</ol>

CodePudding user response:

You're looking for list-style-type. Allowed values are listed here: https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type

ul {
   list-style-type: upper-alpha
}
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>

  • Related