The mystery about classes and IDs

| 1 min | Bumbleboss, Bob
tags: coding, weird-chat

Previously we talked about the hours we spent on coding a part of his website…

Bumbleboss For me it took 5 hrs just to simply stlye it a bit and organize the HTML code and get familiar with xD Like the custom styling that can be simply done by just adding the ID #brown-bg and it does the whole work.

Bob Why ID? Use a class. So you can use it more than once.

Bumbleboss Cuz it already had a class so I couldn’t. Wait wot?

Bob What the heck? You can use more than one class!

Bumbleboss WAT?!

Bob That’s what classes are for haha!

Bumbleboss (╯°□°)╯︵ ┻━┻

Bob class="class_1 class_2 class_9999"

Bumbleboss reeeeeeeeee <div class="some_class" id="black-bg">

Bob You can use IDs multiple times as well but they’re inteded to IDENTIFY a div not STYLE it. Classes are basically for styling and IDs for identifying. Classes use again, IDs use once. That’s CSS and HTML basics tho!

Bumbleboss A silent mouth I shall be on that one. Finds Bob telling everyone in #coding.


I just told the entire internet. If you already got a class, use an ID and if you also got that one, well… HTML has some serious issue I guess.

this is temporarily disabled

Stuff on the backend broke and I'll have to fix the comment server. Please hang tight and enjoy this hold music:

updated on 2022-11-30