HTML Img Alt Attribute - Dofactory
Có thể bạn quan tâm
The alt attribute on an <img> tag specifies alternative text for the image.
This alternative text only displays when the image cannot be loaded.
This value can also help improve SEO.
Example
#
An <img> element with an alt attribute. The image is loaded without error, therefore the alternative text does not display.
<img src="/img/html/vangogh.jpg" alt="Van Gogh, Self-portrait"> Try it liveIn this example the image name has a typo and the file cannot be found. The alt text displays next to a broken image icon.
<img src="/img/html/vangooi.jpg" alt="Van Gogh, Self-portrait"> Try it liveUsing alt
#
The alternative text displays only when the image is not found, or cannot be loaded.
Alternative text is also used by screen readers and SEO to describe the image.
Tip: Use the alt attribute on all your images.
Syntax
#
<img alt="text" />Values
#
Value | Description |
---|---|
text | Alternative text for an image element. |
Browser support
#
Here is when alt support started for each browser:
Chrome | 1.0 | Sep 2008 |
Firefox | 1.0 | Sep 2002 |
IE/Edge | 1.0 | Aug 1995 |
Opera | 1.0 | Jan 2006 |
Safari | 1.0 | Jan 2003 |
You may also like
#
- Our HTML img Tag Reference
- Our HTML alt Attribute Reference
- Our CSS Images Tutorial
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
-
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.)
-
HTML Alt Attribute - HTML Tutorials - W3resource