SEO needs to standardize HTML code

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

SEO, also need to standardize the HTML code of the site, the standardized HTML code for a site has many benefits, such as: Easy to use, code easy maintenance, small amount of code, the site opened fast, suitable for more people to read, and so on, here is not enumerated.

Below, we begin to make initial improvements to our website:

Add DOCTYPE to a Web page

XHTML1.0 provides us with three kinds of doctype:

1. Transition Type (Transitional)

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

2. Strict type (Strict)

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >

3. Frame Type (Frameset)

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 frameset//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" >

Transition-compatible forms, logos, etc., for beginners, choose the transition type on it!

Set a name space

Add the following code after DOCTYPE:
<html xmlns= "http://www.w3.org/1999/xhtml" >
xmlns is a shorthand for XHTML namespace, called "namespaces," and usually our web page has only <html> why is there xmlns? A namespace is a sign of a document that describes who the document specification belongs to. Do you understand? Pass without understanding.

Declarative language encoding

The Simplified Chinese website can be defined as:
<meta http-equiv= "Content-type" content= "HTML; charset=gb2312 "/>
English website can be defined as:
<meta http-equiv= "Content-type" content= "HTML; Charset=utf-8 "/>

Other settings between <Head></Head>

1. Favorites Small Icon

Make a 16*16 ico icon, name it favicon.ico, place it in the root directory of your site, and then place the following code between <Head></Head>.
<link rel= "icon" href= "/favicon.ico" type= "Image/x-icon"/>
<link rel= "disambiguator icon" href= "/favicon.ico" type= "Image/x-icon"/>

2. Author and copyright information

<meta name= "Author" content= "Hxstream"/>
<meta name= "Copyright" content= "www.world-blog.cn, All rights reserved"/>

3. About the site

<meta name= "description" content= "Shenzhen seo for the vast number of enterprises to provide SEO optimization services"/>

4. Site keywords

<meta content= "search engine optimization, seo" name= "keywords"/>

Close all labels

Open tags must be closed, such as <p>www.world-blog.cn</p>, and of course there is a way to close, such as:<br/>

Attribute values are enclosed in ""

For example: <img height= "....../>"

Assign values to all properties

Incorrect wording: <input ... checked/>
The correct wording is: <input ... checked= "checked"/>

All XHTML elements and their attribute names in lowercase

XHTML is case sensitive
The wrong wording is:<title>www.world-blog.cn</title>
The standard is written as:<title>www.world-blog.cn</title>

Label should be properly nested

Incorrect wording:<div><h1>www.world-blog.cn</div></h1>
The correct wording is:<div><h1>www.world-blog.cn</h1></div>

Special characters with coded IDs

such as "<" with "&lt;" Said, ">" with "&gt;" Said。

Add alt attribute to picture

The Alt property specifies that the text is displayed for replacement when the picture cannot be displayed.
such as: <img src= "Images/logo.gif" alt= "Shenzhen seo service for You"/>

Output content with structured elements

For example: you want to enter three lines of text, you can use:
www.world-blog.cn<br/>www.world-blog.cn<br/>www.world-blog.cn
I suggest replacing the above by the following way:
<ul>
<li>www.world-blog.cn</li>
<li>www.world-blog.cn</li>
<li>www.world-blog.cn</li>
</ul>

Article Source: http://www.world-blog.cn

Webmaster Network News list Www.admin5.com/top

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.