The class and ID names in CSS can be customized, and they do not retain keywords like some programming languages. They can be completely named in CSS. But to make CSS more readable, many people advocate standard naming. Speaking of this, I found that many of the CSS names I have previously written are messy and have to be changed.
Today, I found a common CSS class and ID Naming Standard text, which is very important to think. Writing code is a good habit.
The following are common CSS classes and ID naming rules:
File naming rules
Global style: global.css;
Frame layout: layout.css;
Font.css;
Link style: link.css;
Print Style: print.css;
Comprehensive style: style.css
Class/ID naming rules
Webpage: header
Content
Container: container
Footer: footer
Copyright: copyright
Navigation: menu
Main navigation: mainMenu
Subnavigation: subMenu
Button: btn
Login: login
Link
Information Box: manage
Logo: logo
Banner
Title: title
Sidebar: sidebar
Icon
Note: note
Search: search
This article is from: www.Gonten.com