Line breaks between ALT and title and their differences

Source: Internet
Author: User

 

Line feed

Method 1:

Html Code
    1. ALT="Row 1 & amp; #13; Row 2 & amp; #13; Row 3"
 
Alt = "Row 1 & amp; #13; Row 2 & amp; #13; Row 3"

 

Method 2:

HTML code
    1. ALT= "First line
    2. Row 2
    3. Row 3
    4. "
 
Alt = "the first row, the second row, and the third row"

 

Similar title

Differences

In fact, it is very simple: ALT is used to prompt the image; title is used to prompt the link text or common text!

According to the explanation of a strong foreign speaker, the alt attribute is not used for prompting, or more specifically, it does not provide additional instructions for the image; on the contrary, the title attribute should be used to provide additional information for the element,

Specific:

The ALT attribute includes the replacement description, which is required for images and image hotspots. it can only be used in IMG, area, and input elements (including applet elements ). for the input element, the alt attribute is intended to replace the image of the submit button. the ALT attribute is used to provide text instructions for those who cannot see the images in your document.

The ALT attribute must be less than 100 English characters in length or must be as short as possible.

The title attribute provides information about the creation of the element that sets this attribute. The title attribute can be used in all tags except base, basefont, Head, HTML, Meta, Param, script, and title. the title attribute can be used to add descriptive text to a link or provide additional descriptive information for the image, such as date or other non-essential information.

The title attribute value can be longer than the alt attribute value.

 

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.