0

CSS code

Hello hello!!! i have just learn the css code and i would like to know the chronology when i'm coding if i want a clean website (i mean with which class or id i have code first then after). Is there someone who can help me with that? Is there any courses i can find for that? ps: Excuse my english!!! :/ thank you :)

12th Dec 2017, 7:32 PM
Georges SARR
Georges SARR - avatar
4 Answers
+ 5
first use the smantic tags like <header> <footer> <section> then use the id for specific part of your page like <section id="slider">....or <section id="latest news" ....so on then use the class names for define the style meaning not meaning of content like <div class="card"> ..... </div> or <div class="box">.... not <div class=red-text> or class="section-one"
12th Dec 2017, 9:16 PM
Mukhtaar Aziz
Mukhtaar Aziz - avatar
+ 1
It does not matter what order things are done. I put my tag based styles first, following by the class based ones, ending with my id based ones. If there are a lot of them, I'd list those sections in alphabetical order.
12th Dec 2017, 8:59 PM
John Wells
John Wells - avatar
+ 1
ok i'll follow your advice , thank you @john Wells for your answer
12th Dec 2017, 9:04 PM
Georges SARR
Georges SARR - avatar
+ 1
thank you @Mukhtaar that will help, i'm always doing that mistake like <div class=red-text>
12th Dec 2017, 10:33 PM
Georges SARR
Georges SARR - avatar