Line feed
Method 1:
Html Code
- 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
- ALT= "First line
- Row 2
- Row 3
- "
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.