Html编写基础标准(国外英文资料)
Html编写基本规范
Html writes basic specifications
File related specifications:
The file name must consist of lowercase letters, Numbers, and underscores.
The file encoding USES utf-8 by default.
CSS files are introduced in an external way.
The external method: < link rel = "stylesheet" / > (the type declaration type = "text/CSS" can be ignored).
In principle, it is not allowed to write styles directly on HTML.
The link should be in the head.
Block naming conventions:
In general, the main block naming conventions for a website are divided into:
1: the head the header
2: the tail footer
The main body of the page is main
4: navigation nav
5: the subnavigation subnav
6: advertising banner
7: menu menu
8: submenu submenu
9: search search
10: content the content
11: scroll scroll
Article 12: login loginbar
13: logo
15: the sidebar sidebar
16: tabs TAB
17: list
18: paging pagelist
Message: MSG
20: column header title
21: guide guild
22: service service
Hot hot 23:
24: news news
25: download the download
26: register register
28: state the status
29: back prepage
Nextpage 30: the next page
31: copyright copyright
32: links friendlink
33: coat wrap
34: left navigation: leftsidebar
35: right navigation: rightsidebar
36: icon icon
37: text TXT
General situation is such, other details as the case may be, be sure to use simple English combination named, cannot use Numbers, letters and Chinese name, suggested naming short and meaningful.
3 annotation specifications
1, the top of the CSS file is annotated
/ *
* @description: Chinese
* @ author: jiangliqiong
* @update: jiangliqiong (2012-11-11)
* /
Single line comments in the CSS file
/ * comments are the style of which module
HTML internal annotation structure
< div class = "header" > < / div >
4 typesetting specification
The rule is written as a single line, and the rules in the entire file must be unified.
More than 1.1 selectod Shared a style set, and multiple selectors must be written in