搜索引擎優(yōu)化(seo)有很多工作要做,其中對代碼的優(yōu)化是一個很關(guān)鍵的步驟呀酸。為了更加符合seo的規(guī)范叹括,下面是目前流行的div+css的命名規(guī)則:
1.html頁面標(biāo)簽的命名:
頁頭:header
登錄條:loginBar
標(biāo)志:logo
側(cè)欄:sideBar
廣告:banner
導(dǎo)航:nav
子導(dǎo)航:subNav
菜單:menu
子菜單:subMenu
搜索:search
滾動:scroll
頁面主體:main
內(nèi)容:content
標(biāo)簽頁:tab
文章列表:list
提示信息:msg
小技巧:tips
欄目標(biāo)題:title
友情鏈接:friendLink
頁腳:footer
加入:joinus
指南:guild
服務(wù):service
熱點:hot
新聞:news
下載:download
注冊:regsiter
狀態(tài):status
按鈕:btn
投票:vote
合作伙伴:partner
版權(quán):copyRight
2.css中id的命名:
外套:wrap
主導(dǎo)航:mainNav
子導(dǎo)航:subnav
頁腳:footer
整個頁面:content
頁眉:header
頁腳:footer
商標(biāo):label
標(biāo)題:title
主導(dǎo)航:mainNav(globalNav)
頂導(dǎo)航:topnav
邊導(dǎo)航:sidebar
左導(dǎo)航:leftsideBar
右導(dǎo)航:rightsideBar
旗志:logo
標(biāo)語:banner
菜單內(nèi)容1:menu1Content
菜單容量:menuContainer
子菜單:submenu
邊導(dǎo)航圖標(biāo):sidebarIcon
注釋:note
面包屑:breadCrumb(即頁面所處位置導(dǎo)航提示)
容器:container
內(nèi)容:content
搜索:search
登陸:login
功能區(qū):shop(如購物車作煌,收銀臺)
當(dāng)前的current
3.css文件命名:
主要的:master.css
布局版面:layout.css
專欄:columns.css
文字:font.css
打印樣式:print.css
主題:themes.css