DEV Community

Cover image for 10 HTML and CSS Good Practices πŸ…πŸ…

10 HTML and CSS Good Practices πŸ…πŸ…

Tabassum Khanum on February 01, 2022

Hey Coders, Code readability and re-usability are the fundamentals for development. It is key to maintainability and working together with a team. ...
Collapse
 
kassacraven profile image
KassaCraven β€’

It is the best and fantastic post for the new learner so that they can improve their skills. I'm also one of them.. . helped me alot thanks vasiyam specialist in Tamilnadu

Collapse
 
guzz profile image
GuZz β€’

Very good post! Thanks

Collapse
 
codewithtee profile image
Tabassum Khanum β€’

Glad to help!

Collapse
 
inza19 profile image
inza19 β€’

Riche d'enseignement... merci

Collapse
 
nazimudheen_ti profile image
NAZIMUDHEEN TI β€’ β€’ Edited

Thank you.. Thabassum 😊

Collapse
 
arjunantk profile image
ArjunanTk β€’

Yeah.. It is very useful to me as a beginner. I am very thankful for this.

Collapse
 
codewithtee profile image
Tabassum Khanum β€’

Glad you find this useful!

Collapse
 
kristinelavo profile image
KristineLavo β€’

It is the best and fantastic post for the new learner so that they can improve their skills. I'm also one of them..Kerala vasiyam specialist in Coimbatore

Collapse
 
icefront profile image
icefront β€’

Good post, thank you!
However "Use soft tabs with two spaces" isn't a good advice at all. Two spaces bloat the file length. Tabs are better for 2 reasons:

  • 1 byte instead of 2 per line
  • better text indentation. Nowadays tabs are rendered almost exclusively as 4 spaces.
Collapse
 
silentimp profile image
SilentImp β€’
  1. Attribute Order

Is there any research behind that?
Why this particular order?

Collapse
 
codewithtee profile image
Tabassum Khanum β€’

It doesn't really matter what order we put attributes in an HTML tag, but an order can maintain a consistent pattern for readability reason. Its just a good practice to list HTML attribute in an order that reflects the fact that class names are the primary interface through which CSS and JavaScript select elements.