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 is the specification of web front-end development?

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly shows you "what is the specification of web front-end development", the content is simple and clear, and I hope it can help you solve your doubts. Let the editor lead you to study and learn "what is the specification of web front-end development".

What are the specifications of web front-end development

I. document specification

1. Html, css, js and images files are all archived to the agreed directory

2. Html file naming: English nomenclature, suffix. Htm. At the same time, put the corresponding interface manuscript in the same directory. If the interface manuscript is named in Chinese, please rename it with the same name as the html file, so that you can find the corresponding page when adding functions at the backend.

3. Css file naming: English naming, suffix. Css. Share base.css, home page index.css, other pages are named according to the actual module requirements.

4. Js file naming: English naming, suffix. Js. Share common.js, others are named according to the actual module requirements.

II. Html Writing Standard

1. Document type declaration and coding: unified as html5 declaration type; unified coding, using IDE to achieve hierarchical indentation when writing

two。 In non-special cases, the style file must be linked to … Between; in non-special cases, the JavaScript file must be linked to the bottom of the page

3. When introducing style files or JavaScript files, omit the default type declaration.

4. To introduce a JS library file, the file name must include the library name and version number and whether it is a compressed version, such as jquery-1.7.1.min.js; plug-in, and the file name format is library name + plug-in name, such as jQuery.cookie.js

5. All codes follow the xhtml standard. Label & attribute & attribute naming must consist of lowercase letters and underscore numbers, and all tags must be closed; attribute values must be enclosed in double quotes.

6. Make full use of html tags without compatibility problems, such as span, em, strong, optgroup, label, etc. When you need to add custom attributes to html elements, you should first consider whether there is a default appropriate tag to set them. If not, you can add custom attributes with the prefix "data-" to avoid using other naming methods such as "data:".

7. Semantic html, such as h for headings according to importance (there can be only one H2 for a page), p for paragraph marks, ul for lists, and block-level elements cannot be nested in inline elements

8. Minimize div nesting as much as possible

9. When writing a link address, redirection must be avoided. For example, href= "http://www.codingke.com/"," should be followed by "/" after the URL address.

10. Try to avoid using the style attribute, that is, style= "…" on the page.

11. You must add a label to the descriptive form element (input, textarea)

twelve。 Pictures that can be rendered in the form of background should be written into css style as much as possible

13. Important pictures must add alt attributes; add title to important and truncated elements

14. Annotate the block code and important functions (such as loops) to facilitate the addition of functions in the background

15. Use special symbols: use code substitutions whenever possible: for example) & spaces () &? (?) Wait a minute.

16. When writing a page, consider backward extensibility

These are all the contents of the article "what are the specifications for web front-end development?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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