Home > Web Front-end > CSS Tutorial > What is css naming convention

What is css naming convention

王林
Release: 2021-01-30 15:56:11
Original
4151 people have browsed it

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,

to

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template