Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the naming conventions of DIV CSS

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what are the naming conventions of DIV CSS". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what the naming conventions of DIV CSS are.

When we develop CSS+DIV pages (Xhtml), the most confusing and tangled thing is CSS naming, especially when beginners don't know where to name and how to name it.

Naming convention description:

1) all names are preferably lowercase

2) the value of the attribute must be enclosed in double quotation marks (""), and must have values such as class= "", id= ""

3) each label should have a beginning and an end, and should have the correct level, and the typesetting should be regular and neat.

4), the empty element should have an ending tag or add "/" after the starting tag

5), presentation and structure are completely separated, and no expressive elements are involved in the code, such as style, font, bgColor, border, etc.

6), the definition should follow the principle from large to small, reflect the structure of the document, and facilitate the query of the search engine.

7) add a unique, structural tag id to each table and form

8) tag the picture with alt

9). Use English naming principles as far as possible

10) try not to abbreviate, except for words that are easy to understand

CSS style naming relative to the important part of the outer layer of the web page:

Coat wrap- for outermost header header- for header main content main- for main content (middle) left main-left- left layout right main-right- right layout Navigation bar nav- web page menu navigation bar content content- for the middle body of the page bottom footer- for the bottom

DIV+CSS naming reference Table:

The following are CSS style naming and CSS file naming reference tables, and DIV CSS naming collections:

CSS style naming description

Public naming of web pages

# wrapper

The page periphery controls the overall layout width

# container or # content

Container, for outermost layer

# layout

Overall Arrangement

# head,#header

Header section

# foot,#footer

Footer section

# nav

Main navigation

# subnav

Secondary navigation

# menu

Menu

# submenu

Submenu

# sideBar

Sidebar

# sidebar_a,#sidebar_b

Left or right column

# main

Page body

# tag

Label

# msg#message

Prompt information

# tips

Tips

# vote

vote

# friendlink

Friendship connection

# title

Title

# summary

Abstract

# loginbar

Login bar

# searchInput

Search input box

# hot

Hot spot

# search

Search

# search_output

The search output is similar to the search results

# searchBar

Search bar

# search_results

Search results

# copyright

Copyright information

# branding

Trademark

# logo

Website LOGO logo

# siteinfo

Website information

# siteinfoLegal

Legal declaration

# siteinfoCredits

Credit standing

# joinus

Join us.

# partner

Partners

# service

Service

# regsiter

Register

Arr/arrow

Arrowhead

# guild

Guide

# sitemap

Site map

# list

List

# homepage

Home page

# subpage

Secondary page sub-page

# tool,#toolbar

Tool bar

# drop

Drop-down

# dorpmenu

Drop-down menu

# status

Status

# scroll

Rolling

.tab

Label page

.left.right.center

On the left, center, and right

.news

Journalism

.download

download

.banner

Banner (top banner)

E-commerce related

.products

Product

.products _ prices

Product price

.products _ description

Product description

.products _ review

Product review

.editor _ review

Editor's comment

.news _ release

The latest products

.publisher

Manufacturer

.screenshot

Thumbnail image

.faqs

common problem

.keyword

Keywords

.blog

Blog

.forum

Forum

CSS file naming instructions

Master.css,style.css

Main

Module.css

Module

Base.css

Basic sharing

Layout.css

Layout

Themes.css

Theme

Columns.css

Column

Font.css

Text, font

Forms.css

Form

Mend.css

Patch

Print.css

Printing

Thank you for your reading, the above is the content of "what are the naming conventions of DIV CSS". After the study of this article, I believe you have a deeper understanding of what the naming conventions of DIV CSS have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report