HTML Alt Attribute - HTML Tutorials - W3resource
Có thể bạn quan tâm
alt
The purpose of the HTML alt attribute is to specify a short description for the supported elements.
Supported elements
HTML alt attribute supports area, img, input elements.
Syntax
<ElementName alt="value" >.....</ElementName>Where ElementName is any supported element.
Type of value
Type of value of HTML alt attribute is text.
Value
A piece of text containing a short description of the adjacent content.
Default value
There is no default value of HTML alt attribute.
Supported doctypes
HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.
Example of HTML alt attribute with img and area
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Example of HTML alt attribute with area and img </title> </head> <body> <img src="attribute-alt-img-area.gif" alt="alt example " width="308" height="190" border="0" usemap="#Map"> <map name="Map"> <area shape="rect" coords="8,5,100,77" href="../../mysql/mysql-tutorials.php" target="_blank" alt="mysql tutorial"> <area shape="circle" coords="155,93,59" href="../../php/php-home.php" target="_blank" alt="php tutorial"> <area shape="rect" coords="197,136,306,188" href="../../sql/sql-tutorials.php" alt="sql tutorials"> </map> </body> </html>Result
View this example in a separate browser window
Example of HTML alt attribute with img and area.
Example of HTML alt attribute with input
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Example of HTML alt attribute with input</title> </head> <body> <form action="action.php"> Email id : <input type="text" name="email" alt="Your Email id"/><br /> Password : <input type="text" name="passw" alt="Your Password"/><br /> <input type="submit" value="Submit" /> </form> </body> </html>Result
View this example in a separate browser window
Example of HTML alt attribute with input.
Previous: HTML align attribute Next: HTML archive attribute
Từ khóa » Html Td Alt Tag
-
Display An Alternate Text On Mouseover For A Table Entry
-
HTML Alt Attribute - W3Schools
-
HTML Img Alt Attribute - W3Schools
-
Learn How Does Alt Tag Work In HTML With Examples - EduCBA
-
HTML Img Alt Tags For SEO Best Practice - Search Engines Love ...
-
HTML5: Techniques For Providing Useful Text Alternatives
-
H37: Using Alt Attributes On Img Elements | Techniques For WCAG 2.0
-
H67: Using Null Alt Text And No Title Attribute On Img Elements ... - W3C
-
Image ALT Tag Tips For HTML - Accessibility At Penn State
-
: The Image Embed Element - HTML - MDN Web Docs - Mozilla
-
HTML Img Alt Attribute - Dofactory
-
Examination Of Alt Text Guidance In The HTML5 Draft
-
2 Adding Alt Text To Images & Tables | Digital Services Georgia
-
Element: Alternate Text Name (for A Figure, Etc.)