Picture label the difference between ALT and title in img

Source: Internet
Author: User

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

May be a lot of beginners in the station to optimize the time, do not understand the picture label IMG ALT and title of the difference, today, SEM college alone for everyone to clean up and share the difference.

You can do the test together: The text that is saved in the following code is named the file with an. html end, and then opened separately in a different browser.

Code:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en"

"Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns= "http://www.w3.org/1999/xhtml" >
<head><title> picture Label the difference between ALT and title in IMG </title></head>

<body>
<img src= "Correct address of image" title= "title correct picture" >
<img src= "Correct address of image" alt= "alt correct picture" >

<img src= "Image error Address" title= "title error Picture" >
<img src= "Image error Address" alt= "alt error Picture" >

</body>
</html>

  

The performance of the code under IE6

  

The performance of the code under IE8

The performance of the code under Firefox

From the above three photos we can see the difference between Alt and title:

1. Different meanings

ALT is the alternative text when the picture doesn't exist; title is the description and further explanation of the picture

2, the performance in the browser is different

In Firefox and IE8, the title value is displayed when the mouse passes through the picture, and the Alt value is not displayed; only in IE6, the title and ALT values are displayed when the mouse passes over the picture.

For website SEO optimization, title and alt have the most important point:

The search engine to the picture meaning judgment, mainly relies on the ALT attribute. So in the picture Alt attribute to brief text description, also contains the keyword, is also the page optimization part. If conditions permit, you can further describe the picture in the title attribute.

Author: Mengfanxing @sem College

Original link: http://www.semxyz.com/seo/780.html

All rights reserved, reproduced please link the form of the author and original source

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.