Common CSS classes and ID naming rules

Source: Internet
Author: User

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

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.