How to erase the dots in <ul>?

Hey guys i am asking how to erase the side dots of the “ul” ?
Thanks in advance. :slight_smile:

3 Likes

I assume by dots you mean bulleted lists? Like those?

  • This is an unordered list using the <ul> tag
  1. This is an ordered list (or numbered) using the <ol> tag

In the css you can grab the ul either by class or id and specify list-style: none .

8 Likes

yes the bulleted list and also and order list how to erase the dots and numbers ?

Thanks @tuscannypolk it worked :+1: :ok_hand:

1 Like

I’ve never heard of list-style in my life. It’ll be useful!

2 Likes

list-style is really helpful
->list-style-type: upper-roman;
I. Coffee
II. Tea
III. Coca Cola

to create many things its really useful

1 Like

i did not know that roman style pretty cool actually thanks @arnagendra2000
for your help :smiley:,:ok_hand::nose:

You can also add images (icons) and other style types.

2 Likes

Great website ! thanks @lasjorg :ok_hand:

What I’ve come to learn is that the practice is that id is used for JavaScript, not CSS. So it’s best to change styles using class names, not id.

1 Like

Interesting :thinking:. Ive been using id more frequently because I often find myself not needing the extra “inclusion” capability of a .class; especially when I only am manipulating a single element (which is quite often).

But I can see how using .class can be more beneficial in the long run for keeping your CSS files dry. So what is it that you do? Do you use classes pretty much exclusively for hooks in CSS and then add ID’s exclusively when hooking Javascript files?

The problem with ids is their specificity. If you are absolutely sure you only have, and forever will have, only one element that needs that style then I guess it doesn’t really matter much. But that is rarely the case and will often change over time.

My suggestion is just don’t use ids for CSS. They really do not offer many, if any, benefits.

2 Likes

Thanks for the link - some very useful info in there.

1 Like

It’s just a best practice to use class names for CSS; id is for JavaScript.

I also used to use id and class interchangeably, when I had less experience. But I learned and, importantly, worked on a team with other people. When you’re collaborating, it’s important to follow established practices.

In your own documents, I guess you can use whatever you want. But it’s good to get experience using established practices, which you’ll use anyway if your goal is to find a job.

1 Like