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 should be paid attention to in HTML code optimization

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces what HTML code optimization needs to pay attention to, the article is very detailed, has a certain reference value, interested friends must read it!

Document type (DOCTYPE)

There are three DOCTYPE types for XHTML1.0:

1. Transitional (Transitional)

2. Strict (Strict)

3. Frame (Frameset)

II. Namespace (xmlns)

III. Declarative language coding (charset)

1. Simplified Chinese:

2. Traditional Chinese

3. English

4. Chinese and English (International)

5. Western Europe

6. Arabic

7. Central Europe

IV. Title tag (title)

Network Marketing case _ Network Promotion skills

1. The first keyword

Must be the main content of the page, such as "site optimization page", you should write "site optimization"

2. Noun phrase

It must be to introduce a noun phrase with keywords in the previous sentence. In the above example, there are many keywords, such as "network marketing", "network promotion", "network marketing planning" and so on. Be careful not to use words such as "de", "le", "ah", "Shang" and other words that cannot constitute keywords. Reason: waste of resources.

3. Other keywords

Do not put keywords on the web page that do not have text.

4. Symbols

The symbol "_" should not be written as "-" (Chinese status), but can be written as "-" (English status); in accordance with "|", "can be used", "(English status) instead, do not use", "(Chinese status).

5. Number of words

Key words four-six words, phrase + the first keyword should not exceed 39 characters (less than 19 words), the total number should not exceed 80 characters (40 Chinese characters), parts more than 39 characters will not be displayed by search engines, departments with more than 80 characters will not be included by search engines, too many parts will affect the ranking of the site.

6. Other

Don't use "/ >" at the end, write ">" directly.

1. Number of words

The total quantity should not exceed 100 characters (50 Chinese characters)

2. Key words

Key words should not be superimposed, "packaging machinery, packaging design, food packaging, packaging companies, packaging users, packaging information, packaging orders, packaging enterprises, packaging news, packaging information" should be changed to "packaging, design, food, company, enterprise, user, information, machinery, orders, news, information". Sometimes in order to increase relevance, several keywords such as "packaging machinery, packaging design" can be added. To increase the correlation.

3. Symbols

Symbols need to use "," (English status), not "," (Chinese status)

4. Other

Don't use "/ >" at the end, write ">" directly.

Note:

1. Number of words

No more than 200 characters (100 Chinese characters). Parts of more than 152 characters (76 Chinese characters) will not be displayed by search engines.

2. Symbols

Symbols need to use "(", ")" (English status) instead of "(") ". Reason: waste of characters.

1. Key words

Try to contain keywords and be able to represent unique attributes.

2. Number of words

28 characters (14 Chinese characters) are enough, such as "xxxxx Network Technology Co., Ltd.".

3. Symbols

It is not recommended to use the match in Chinese state, because the characters in Chinese state generally occupy two characters, which wastes one character.

It is recommended that there are no more than 12 characters (6 Chinese characters), and 4-8 characters (2-4 Chinese characters) is the best.

5. Cascading style sheet (CSS) call

Try to use only one .css file with an absolute address.

VI. Script language (JS) call

The same cascading style sheet (css) call

7. Try not to use other code

In particular, it is noted that:

1. Write the css code directly in the header

2. Write the JS code directly in the header

3 、

Pay special attention to: do not use refresh to enter the home page.

VIII. De-assimilation

Artists try to use the DIV+CSS mode instead of the traditional table, because there are so many table tags that search engines can read.

9. The case of the label should conform to the specification.

Be particularly careful not to capitalize the following tags

The code is as follows:

Don't forget to close the label if you have two labels.

11. Nesting of labels should be reasonable

The first package

XII. Special characters are identified by coding

Such as: "?" Copyright symbols use "?"; "?" for registered trademarks "?" It means.

XIII. Link label ()

Shanghai SEO training

1. Newline character

If you want the comment to be displayed on multiple lines, you can use "" as the newline character

2. Number of keywords

No more than 36 characters (18 Chinese characters) is recommended.

3. Arrangement principle

Unique keywords come first, repetitive keywords come back as far as possible

4. Other

Try not to use "of", "upper", "good", "etc.". Search engine databases do not include words by default.

14. Picture label (

)

xxxxxLOGO

15. Flash tag ()

Add before the label

Add after the label

1. Do not appear "(space),"-","! "in the tag. Etc., to break the characters of the label

2. It is appropriate to express the general content of Flash in the number of words, and it is not appropriate to add unexpressed words in Flash, which will be convicted of cheating.

XVI. Frame label ()

The code is as follows:

Text content

Seventeen. CSS code

1. For example:

The code is as follows:

H2 {

Font-size: 16px

Color: # 0000FF

Text-align: left

}

P {

Font-size: 18px

Color: # 0000FF

Text-align: left

}

Rewrite to

The code is as follows:

H2,p {

Font-size: 18px

Color: # 0000FF

Text-align: left

}

2. Another example: "margin:0px 0px 0px 0px;"

Change to "margin: 0px;"

The above is all the contents of the article "what do you need to pay attention to in HTML Code Optimization?" Thank you for reading! Hope to share the content to help you, more related 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

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report