web development specification - file naming rules

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Foreword

Unified file name with a combination of lowercase letters, numbers, and underscores, which must not contain Chinese characters, spaces and special characters; nomenclature guiding ideology first, so that each member of your own and working groups can easily understand each file sense, the second is when we use the command 'by name row embodiment "in the folder, files of the same category can be arranged together so that we can find, modifications, substitutions, and the like calculated load operation.

HTML nomenclature

Document cited in uniform use index.htm index.html index.asp file name (lowercase)
the principle of each sub-pages should be named after the first English translation of the name of the column to take a single word as a name.
For example:
About Us \ aboutus
Feedback \ feedback
products \ product

If the column names are many and complex word name in English is not good, the consistent use of the column name pinyin or pinyin first letters.
Each directory should contain a default html file, the file name with a unified index.htm index.html index.asp.

Nomenclature picture

The name of the head and tail picture is divided into two parts, separated by an underscore, the first part represents the major categories of the nature of this image.
For example: advertising, signs, menus, buttons, and so on.
Placed at the top of the page rectangular image ads, and other decorative patterns named: banner
iconic picture named: logo
position is not fixed and small pictures on the page with a link button we named
a certain position on the page consecutive, identical nature of the link section of the picture we named: menu
decorated with photos of our name: pic
without the title picture link represents our name: title
example: banner_sohu.gif banner_sina.gif menu_aboutus.gif menu_job.gif title_news.gif logo_police.gif logo_national.gif pic_people.jpg
Rollover effect picture naming as "picture name + _ + on / off".
For example: menu1_on.gif menu1_off.gif

Nomenclature of JavaScript

For example: javascript file banner javascript files named ad.js pop-up window called pop.js.

Dynamic language file nomenclature

_ The nature of description, there may be a plurality of words, with "_" spaced, generally the nature of the summary page too.
Examples: register_form.asp register_post.asp topic_lock.asp

Guess you like

Origin blog.csdn.net/weixin_44198965/article/details/94325742