Home > Article > Web Front-end > What is css naming convention
css naming convention: 1. All names should be lowercase; 2. Attribute values must be enclosed in double quotes; 3. Each tag must have a beginning and an end; 4. Performance and structure requirements Complete separation; 5. Add structural tag ID to each table and form; 6. Add alt tags to pictures; 7. Try to use English naming rules.
The operating environment of this article: windows10 system, css 3, Acer S40-51.
CSS naming convention:
1. All names should be lowercase
2. Attribute values must be enclosed in double quotes ("")
3. Each tag must have a beginning and an end, and must have the correct level, and the layout must be regular and neat.
4. Empty elements must have an ending tag or add "" after the beginning tag. /"
5. Performance and structure are completely separated. The code does not involve any performance elements, such as style, font, bgColor, border, etc.
6,
7. Add a unique structural tag id to each table and form
8. Add alt tags to pictures
9. Try to use English naming principles
10. Try not to abbreviate words unless they are easy to understand at a glance
Related recommendations: CSS tutorial
The above is the detailed content of What is css naming convention. For more information, please follow other related articles on the PHP Chinese website!