September 10

Read Shanghai dragon optimization code teach you to perfect slim

also has many CSS style simplified methods, for example:.Mycss {padding-top:10px; padding-right:5px; padding-bottom:10px; padding-left:3px if the abbreviated form, only.Mycss 5px 10px {padding:10px 3px can be simplified, the specific style of those, we find the relevant CSS tutorial can be, many online.

a lot of people in order to facilitate debugging (often used in common embedded head region and appear in the tag line of embedded CSS), which will increase the amount of code page content, is not conducive to the search engine to quickly understand the information on pages. We should let all CSS in an external file, so that the most concise code ".


1, garbage code, code such as meaningless default attributes, spaces, statements and null statements etc..

3, the CSS style write external files written by CSS –

is not to say that the site uses DIV+CSS must be equal to the optimization of home, the relationship between the DIV level can not be ignored, will directly affect the search engine information on the page block understanding! If you don’t understand, can refer to Shanghai dragon Jones blog page source code, see page hierarchy glance.

should master the "Shanghai dragon code optimization, because search engines and people are not the same, they are not to see with the eyes, but through the code to analysis". Especially for large sites, station code optimization work affects Shanghai Longfeng work to a great extent. Today, Shanghai dragon will share several "Jones code optimization experience to all of you.

2, use DIV+CSS layout page

We must pay special attention to one point:

4, using HTML tags, reduce the "class=xxx" >

a lot of people using table in the web page, maybe this is simple for the layout and page compatibility, but the layout of table without a clear hierarchy, if the table is nested will greatly increase the amount of code multilayer. The div+css code layout can make the code more concise, website optimization effect will be more obvious.

Embedded CSS

especially in the process of making web pages of space, will certainly be a lot, generally the size of the 100K space ", the space occupied by about 15K. The space character most often appear in the code at the beginning and end of the empty row. We can put in the Dreamweaver in all of the selected code and then press shift+tab left. After the removal of space, you can put the page size, improve web page open speed.

Copyright 2021. All rights reserved.

Posted September 10, 2017 by admin in category "vuevytuezlvr

Leave a Reply

Your email address will not be published. Required fields are marked *