<span id="Label3"></p><p><p><body> tags do not belong to the head area, it is emphasized that in order to ensure browser compatibility, you must set the page background <body bgcolor= "#FFFFFF" ></p></p><p><p></p></p><p><p><b>2.</b> <b>Web page Authoring details----fonts</b><br><b>1.</b> You must use a CSS style sheet for <b>text font</b> style and <b>line spacing</b> when setting font Styles. Suppresses the <font size=?> tag from appearing on the Page.<br><b>2.</b> in the Web page Chinese should be preferred to use the song Body. English and digital preferred to use Verdana and Arial two Fonts. Generally use the Chinese song Body 9pt and 11pt or 12px and 14.7px This is the optimized font size, bold or italicized word bold, the general selection of 11pt and 14.7px font size is more Appropriate.<br><b>3.</b> in order to maximize the function of browser automatic typesetting, in a complete text please try not to use <br> to manually intervene in Segments.<br><b>4.</b> There should be a half-width space between the words in different languages, except for the signs before and after the avoidance of the head, and punctuation between the Chinese characters with Full-width punctuation, and the brackets around the letters and numbers should use Half-width Brackets.<br><b>5.</b> Please do not appear in the Web page more than one and try to use less full-width space (the English character set, The full-width space will be garbled), white space should try to use text-indent, padding, margin, hspace, vspace and transparent GIF images to Implement.<br><b>6.</b> The line spacing is defined as a percentage, and the value of the two leading lines commonly used is line-height:120%/150%.<br><b>7.</b> In typesetting we often encounter the need to do the first line indentation, do not use or full-width space to achieve the effect, the standard practice is to define p {text-indent:2em in the style sheet;} then add <p> tags to each paragraph, note that In general, do not omit the </p> end Tag.</p></p><p><p></p></p><p><p><b>3.</b> <b>Web page making details----links</b><br><b>1.</b> The link path in the Web site is all relative paths, and the link path to the default file that is generally linked to a directory does not have to write the full name, as we do not have to: <a href= "aboutus/index.htm" > instead: <a href = "aboutus/"; all the links in the page to the homepage are written <a href= "/" ><br><b>2.</b> in the browser, when we click on the empty link, it will automatically reset the current page to the first end, thus affecting the User's normal reading content, We use the code "javascript:void (null)" instead of the original "#" tag</p></p><p><p></p></p><p><b><b>4.</b></b><b><b>Web page Making Details----form</b></b><br>1px table style= "border-collapse:collapse"<br>Examples are as Follows:<br><table border= "1" cellspacing= "0" width= "+" height= "+" style= "border-collapse:collapse"<br>bordercolor= "#000000" cellpadding= "0" ><br><tr><br><td></td><br></tr><br></table><br>Set bright, Dark border color<br>Table with bright border (bordercolorlight) and Dark border (bordercolordark) two properties can be set on a table Style.<br><table border= "1" width= "bordercolorlight=" #000000 "bordercolordark=" #FFFFFF "><br>When writing <table> nesting each other, strictly according to the specification, for a single <table> for the,<table><tr> alignment,<td> indent two half-width spaces,<td> If there are nested table,<table> also indent two half-width spaces, if <td> does not have any nested table,</td> end tag should be in the same line as <td>, do not wrap,<br>As we note, there should be no such code in the source code:<br><b><b><td></b><b><b>". /images/sample.gif "></b></b><br><b><b></td></b></b><br>And that should be the case:<br><b><b><td></b><b><b>". /images/sample.gif "></td></b></b><br>This is because the browser thinks that the line is equivalent to a half-width space, the above is not the canonical way to inadvertently add a half-width space, if it is necessary to add a half-width space, you should also write:<br><b><b><td></b><b><b>”.. /images/sample.gif "> </td><br></b></b>A Web page to try to avoid using the entire table, all the content is nested in this large table, because the browser in the interpretation of the elements of the page is displayed in a table, if a page is nested in a large table, then it is likely that the result is when the viewer typed the url, He had to face a blank for a long time before all the Web content appeared at the same time. If you have to do this, use the <tbody> tag so that you can make this large table chunk display</p><p><p></p></p><p><p><b>5.</b> <b>Web page authoring details----download speed</b><br>Home Flash page size should be limited to 200K below, as far as possible using vector graphics and <b>Action</b> to reduce the size of the Animation. Non-homepage static page with picture size should be limited to about 70K, as far as possible to use the background color to replace large pieces of the same color picture.</p></p><p><p></p></p><p><p><b>6.</b> <b>Web Authoring details----include</b><br>ASP standard notation <!--#include file= "inc/index_top.asp"--<br>JSP standard notation <%@ include file= ". /inc/index_top. JSP "%></p></p><p><p></p></p><p><p><b>7.</b> <b>Web page Authoring details---- </b> <b>Alt</b> <b>and</b> <b>Title</b><br>are prompt language tags, notice the difference between them.</p></p><p><p>When we browse the web, when the mouse hovers over a picture object or text link, a prompt message box sometimes appears in the Lower-right corner of the Mouse. Make some comment on the target. On some occasions, its role is very important.</p></p><p><p>Alt is used to prompt a picture. The title is used to give the link text or ordinary text Hint.</p></p><p><p>Use the Following:</p></p><p><p><p title= "give link text tips" > text </p></p></p><p><p><a href= "#" title= "give link text tip" > text </a></p></p><p><p></p></p><p><p><b>8.</b> <b>Web Authoring details----</b> <b>Cache</b></p></p><p><p>Web pages are not cached</p></p><p><p>HTM Web page</p></p><p><p><meta http-equiv= "pragma" content= "no-cache" ></p></p><p><p><meta http-equiv= "cache-control" content= "no-cache, must-revalidate" ></p></p><p><p><meta http-equiv= "expires" content= "0" ></p></p><p><p>ASP Web page</p></p><p><p>Response.Expires =-1</p></p><p><p>Response.ExpiresAbsolute = Now ()-1</p></p><p><p>Response.CacheControl = "no-cache"</p></p><p><p><b>9.</b> <b>Web page Authoring details----browser compatibility</b><br>When you create a site, you should understand that visitors may use a variety of Web Browsers. As much as possible, design the site to have maximum browser compatibility under other known design Constraints.<br>There are more than 20 Web browsers currently in use, most of which have been released in more than one Version. Even if you are targeting only most Web users who use Netscape Navigator and Microsoft Internet Explorer, you should be clear that not everyone is using the latest versions of both Browsers.<br>The more complex your site (in Terms of layout, animation, multimedia content, and interactivity), the less likely it is to be compatible across Browsers. For example, not all browsers can run Javascript. Plain text pages that do not use special characters might be able to display correctly in any browser, but such pages may be much less aesthetically pleasing than pages that use graphics, layout, and interactivity effectively. therefore, you should try to strike a balance between best-effort design and maximum browser compatibility design.<br>All HTML tag attributes are enclosed in single or double quotes, i.e. we should write <a href= "url" > instead of <a href=url></p></p><p><p></p></p><p><p><b></b> <b>image processing Details----banner</b><br>The full-size banner is 468x60px, half-size banner is 234x60px, and the small banner is 88x31px.<br>In addition 120x90,120x60 is also the standard size of small icons. Full size banner no more than 14K.<br>Universal Banner Size 760x100,750x120,468x60,468x95,728x90,585x140<br>Pip size for sub-page 360x300,336x280<br>Cursors: 100x100 or 120x120</p></p><p><p><b> </b></p></p><p><p><b></b> <b>Image processing details----international standard specification for logos</b><br>To facilitate the dissemination of information on the internet, a unified international standard is needed. In fact, this set of standards is already in Effect. There are three kinds of specifications for the logo of the website:<br>88*31 This is the most popular logo specification on the Internet.<br>120*60 This specification for general-size Logos.<br>120*90 This specification is used for large logos.</p></p><p><p></p></p><p><p><b></b> <b>image processing details----page-modified image processing<br></b>The picture has been optimized to speed up the download, has a better visual space effect, with the page style, page content to match, beautifully crafted, the details are handled properly. <b></b></p></p><p><p><b></b></p></p><p><p><b>2.5 JavaScript</b> <b>Writing Specifications<br></b></p></p><p><p>1. In the writing process, each line of code ends must have a semicolon; In principle, all functions are developed in accordance with the requirements of the XXX project to avoid the code pollution caused by the down code of the Internet (shen Redundant code | | Conflicts with existing code | |);</p></p><p><p>2. Library introduction: In principle only the introduction of the jquery library, if the need to introduce a third-party library, the team should discuss the decision with other personnel;</p></p><p><p>3. Name of the variable: Camel-named. Native JavaScript variable requirements are plain English letters, the first letter should be lowercase, such as itaolun; jquery variables require the first character to be ' _ ', the other is the same as the native JavaScript rules, such as: _itaolun; In addition, it is required to declare the variables centrally, avoiding global Variables.</p></p><p><p>4. Class Naming: First uppercase, Hump-named. such as itaolun;</p></p><p><p>5. function Naming: First-letter lowercase camel-named. such as Itaolun ();</p></p><p><p>6. Naming semantics, using English words or their abbreviations as much as possible;</p></p><p><p>7. Avoid using methods or properties that have compatibility and resource consumption, such as eval () & innerText;</p></p><p><p>8. In the post-optimization, the JavaScript non-comment class Chinese characters must be converted to Unicode encoding to use, to avoid coding errors when garbled display;</p></p><p><p>9. The code structure is clear, add appropriate Comments. Improve the function reuse rate;</p></p><p><p>10. Focus on separation from html, reduce reflow, pay attention to Performance.</p></p><p><p><b>2.6</b> <b>Picture Specification<br></b></p></p><p><p>1. All page element class images are placed in the IMG folder, the test is placed in the img/demoimg folder;</p></p><p><p>2. Image format is limited to GIF | | PNG | | jpg</p></p><p><p>3. Name all lowercase english letters | | Numbers | | A combination of _, which must not contain kanji | | Space | | Special characters; use Easy-to-understand vocabulary to make it easier for other members of the team to understand; another, named two parts, separated by underscores, such as Ad_left01.gif | | btn_submit.gif;</p></p><p><p>4. Select the smallest picture format and image quality in case of visual effects to reduce loading time;</p></p><p><p>5. Avoid using translucent PNG images (if used, refer to the CSS specification for instructions);</p></p><p><p>6. Use CSS Sprite technology to centralize small background images or icons to reduce page HTTP requests, But note that you must draw a reference line in the corresponding sprite PSD source map and save it to the IMG directory.</p></p><p><p><b>2.7</b> <b>Annotation Specification</b></p></p><p><p>1. HTML comment: Note Format <!--here is the comment-->, '--' can only be in the beginning and ending position of the comment, cannot be placed in the annotation text area;</p></p><p><p>2. CSS comments: Note format/* Here is the comment */;</p></p><p><p>3. JavaScript comments, single-line comments using '//here is a single-line comment ', multiline comments using/* There are multiple lines of comments */;</p></p><p><p><b></b></p></p><p><p><b>2.8</b> <b>browser compatibility CSS hack</b> <b></b></p></p><p><p><b></b></p></p><p><p><b>first, the identification difference:</b><br>Distinguish ie6,ie7,ie8,ff.<br>1. IE can recognize *; Standard browsers (such as Ff) do not recognize *;</p></p><p><p>2. IE6 can recognize *, but does not recognize!important; IE6 in front of the style _</p></p><p><p>3. IE7 can recognize *, can also identify!important;</p></p><p><p>4. IE8 can identify \ 9 for example: background:red \9;</p></p><p><p>5. Firefox does not recognize *, but can identify!important;</p></p><p><p>1. The difference between IE6 and firefox:<br>background:orange;*background:blue;<br>It means that the background color of Firefox is orange, and the background color of IE is Blue.</p></p><p><p>2. The difference between IE6 and IE7:<br>background:green!important;background:blue;<br>It means: the background color of IE7 is green, the background color of IE6 is blue</p></p><p><p>3. The difference between IE7 and Ff:<br>background:orange; *background:green;<br>This means: the background color of Firefox is orange, and the background color of IE7 is green</p></p><p><p>4. The difference between ff,ie7,ie6:<br>background:orange;<br>*background:green!important;<br>*background:blue;<br>It means that the background of the Firefox browser is orange, the background color of the IE7 browser is green, and the color of the IE6 browser is Blue.</p></p><p><p><b>second, Practical Suggestions</b></p></p><p><p>(1). Choice of development platform</p></p><p><p>Write CSS on Firefox and be compatible with other Browsers. This will certainly be more than in IE do well to other browser compatibility comes easy, because IE on the old standard support is very good, and some of the unique features of IE people do not support. So it is recommended to use Firefox combined with Firebug extension as a platform.</p></p><p><p>(2). the order of CSS Hack</p></p><p><p>Using Firefox as a platform, as long as the code to write enough standards, in fact, there is not a lot of Hack, IE browser is almost no problem, so you can temporarily ignore,</p></p><p><p>The order is as Follows: IE6, IE7, Firefox--other</p></p><p><p>(3). Methods of Hack</p></p><p><p>There are two ways of doing this, one in different files and the other in the same file. In fact, the role is the same, but the starting point is not the Same.</p></p><p><p>1. Processing in the same file.<br>Such as: id= "bgcolor" control to show Blue in IE6, IE7 in green, Firefox and other browsers display Red.</p></p><p><p></p></p><p><p>IE6 do not recognize!important, also do not recognize *+html. so IE6 can only be Blue.<br>IE7 recognized!important, also recognized *+html, priority: (*+html +!important) >!important > +html. IE7 can be red, blue and green, but Green has the highest Priority.<br>Firefox and other browsers all Recognize!important. !important priority, Firefox can be red and blue, but Red has a high priority. the above-mentioned priority symbols are allowed by the CSS3 standard, other browsers also have other hack methods, but I have not yet encountered Firefox normal, Browsers other than IE are not normal, so there is no sharing. as long as the code specification, it is believed that the occurrence of this situation should be very rare (except javascript).</p></p><p><p>2. Processing in different Files.<br>Why the same file can be processed and written in multiple files for different browsers? this is to deceive the web of the verification tool, in fact, only need two files, one for all browsers, and one for IE services only. write all of the code in one place, and some IE must, It cannot be put into another file by the code (E.G. cursor:hand;), and then imported in the following way.</p></p><p><p></p></p><p><p>Web Front end Development specification</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.