Web page Production Tutorial: CSS naming conventions

Source: Internet
Author: User
Tags lowercase
css| Specification | tutorials | Web xhtml-css Writing Suggestions

All XHTML Code Lowercase

The value of the property must be enclosed in double quotes (""), and must have a value
Each label must have a start and end, and have the correct level
The empty element must have an ending tag or add "/" after the start tag.
The performance is completely separated from the structure, and no representation element is involved in the code, such as style, font, bgcolor, border, etc.
The definition of Add a unique, structural tag ID to each table and form
Add comments to important chunks, such as:
Add alt tag to picture
All labels must be properly nested
The root element must have an element before it is declared using that DTD
The root element must have an xmlns attribute to specify the use of http://www.w3.org/1999/xhtml Namespac

CSS style sheet specification:
ID and class name using the English word or combination of the section named, and the first word lowercase, the second word first letter capitalization, such as: newrelease (new product/new+release)
CSS style sheet blocks are annotated with annotations
Use English naming principles as much as possible
No need to add a medium bar and underline
Try not to abbreviate, unless a look at the words understood
CSS Naming conventions
This time due to the work of the need for the name of the CSS to do some research, mainly want to make the document and other specifications, more people can read and understand.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.