18. Lists

list-style-type

You can use the predefined styles.

ul {
  list-style-type: disc;
  list-style-type: circle;
  list-style-type: square;
  list-style-type: decimal;
}
  • Lorem.
  • Fuga.
  • Placeat.

Use a text or emoji.

ul {
  list-style-type: '๐Ÿ‘';
}
  • Eat fruit
  • Exercise
  • Pay taxes

Predefine them with @counter-style.

@counter-style lista-de-ganadores {
  system: fixed;
  symbols: url(oro.png) url(plata.png) url(bronce.png);
  suffix: " ";
}

ul {
  list-style-type: lista-de-ganadores;
}
  • Linux
  • MacOS
  • Windows

Or remove them.

ul {
  list-style-type: none;
}
  • Home
  • FAQ
  • About us

More information

image

Uses an image as a marker in an unordered list.

ul {
  list-style-image: url('oro.png');
}
  • Fernando Alonso
  • Michael Schumacher
  • Ayrton Senna

More information

position

You indicate where you want the marker to be placed.

Inside the <ul>.

ul {
  list-style-position: inside;
}
  • Lorem.
  • Fuga.
  • Placeat.

Outside the <ul>.

ul {
  list-style-position: outside;
}
  • Lorem.
  • Fuga.
  • Placeat.

More information

Activity 1

Implement in HTML the following list with square markers.

Activity 12-1 preview

Activity 2

Implement in HTML the following list with the names of your pets or children. If you don't have any, you can make them up.

Activity 12-2 preview

Activity 3

Implement in HTML the following list, equivalent to a real navigation bar for a website. Don't forget to add a state change when the cursor is over it.

Activity 12-3 preview

Activity 4

Implement in HTML the following list.

Activity 12-4 preview

Building SPAs with Django and HTML Over the Wire: Learn to build real-time single page applications with Python

Building SPAs with Django and HTML Over the Wire: Learn to build real-time single page applications with Python

The HTML over WebSockets approach simplifies single-page application (SPA) development and lets you bypass learning a JavaScript rendering framework such as React, Vue, or Angular, moving the logic to Python. This web application development book provides you with all the Django tools you need to simplify your developments with real-time results.

Buy the book

Help me keep writing

Every coffee gives me a push toward the next article.

Comments

There are no comments yet.