HTML Img Alt 属性| 菜鸟教程
Có thể bạn quan tâm
菜鸟教程 -- 学的不仅是技术,更是梦想!
HTML <img> alt 属性
HTML <img> 标签 AI 思考中... HTML img align 属性 HTML img border 属性
Copyright © 2013-2025 菜鸟教程 runoob.com All Rights Reserved. 备案号:闽ICP备15012807号-1
- 首页
- HTML
- CSS
- JS
- 本地书签
- Search
- Python3 教程
- Python2 教程
- Vue3 教程
- vue2 教程
- Bootstrap3 教程
- Bootstrap4 教程
- Bootstrap5 教程
- Bootstrap2 教程
HTML 标签
<!--> <!DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <big> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <command> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <frame> <frameset> <head> <header> <hgroup> <h1> - <h6> <hr> <i> <iframe> <img> <input> <ins> <kbd> <keygen> <label> <legend> <li> <link> <main> <map> <mark> <menu> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <pre> <html> <picture> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> <strong> <style> <sub> <summary> <sup> <table> <tbody> <td> <textarea> < template> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> <u> <ul> <var> <video> <wbr> HTML img align 属性 HTML img border 属性
HTML <img> alt 属性
HTML <img> 标签
实例
带有指定替代文本的图像:
<img src="smiley.gif" alt="Smiley face"> 尝试一下 »浏览器支持
![]()
![]()
![]()
![]()
![]()
所有主流浏览器都支持 alt 属性。
定义和用法
alt 属性是一个必需的属性,它规定在图像无法显示时的替代文本。
假设由于一些原因(比如网速太慢、src 属性中的错误、浏览器禁用图像、用户使用的是屏幕阅读器)用户无法查看图像,alt 属性可以为图像提供替代的信息。
注意:当用户把鼠标移动到 img 元素上时,Internet Explorer (9 之前的版本)把 alt 属性的值显示为工具提示。根据 HTML 规范,这种行为并不正确。
提示:如果需要为图像创建工具提示,请使用 title 属性!
HTML 4.01 与 HTML5之间的差异
无。
语法
<img alt="text">属性值
| 值 | 描述 |
|---|---|
| text | 规定图像的替代文本。 alt 文本的使用原则:
|
HTML <img> 标签 AI 思考中... HTML img align 属性 HTML img border 属性 1 篇笔记 写笔记
- #0
上山打老虎 老虎猛打我
116***[email protected]
25alt 与 title 属性区别:
图片中的 alt 属性是在图片不能正常显示时出现的文本提示。
图片中的 title 属性是在鼠标在移动到元素上的文本提示。
上山打老虎 老虎猛打我上山打老虎 老虎猛打我
116***[email protected]
3年前 (2023-04-10)
点我分享笔记
取消
分享笔记 分类导航- HTML / CSS
- HTML 教程
- HTML5 教程
- CSS 教程
- CSS3 教程
- Tailwind CSS 教程
- Bootstrap4 教程
- Bootstrap5 教程
- Font Awesome 教程
- Foundation 教程
- JavaScript
- JavaScript 教程
- HTML DOM 教程
- jQuery 教程
- AngularJS 教程
- AngularJS2 教程
- Vue.js 教程
- Vue3 教程
- React 教程
- Next.js 教程
- TypeScript 教程
- jQuery UI 教程
- jQuery EasyUI 教程
- Node.js 教程
- Electron 教程
- Playwright 教程
- AJAX 教程
- JSON 教程
- Echarts 教程
- Chart.js 教程
- Highcharts 教程
- Google 地图 教程
- 服务端
- Python 教程
- Python2.x 教程
- Linux 教程
- Docker 教程
- Ruby 教程
- Java 教程
- C 教程
- C++ 教程
- Perl 教程
- Servlet 教程
- JSP 教程
- Lua 教程
- Rust 教程
- Zig 教程
- Scala 教程
- Go 教程
- PHP 教程
- 数据结构与算法
- Django 教程
- FastAPI 教程
- Flask 教程
- Pillow 教程
- Zookeeper 教程
- 设计模式
- Python 设计模式
- 正则表达式
- Maven 教程
- CMake 教程
- Verilog 教程
- ASP 教程
- AppML 教程
- VBScript 教程
- 数据库
- SQL 教程
- MySQL 教程
- PostgreSQL 教程
- SQLite 教程
- MongoDB 教程
- Redis 教程
- Memcached 教程
- AI & 数据分析
- Python 教程
- NumPy 教程
- Pandas 教程
- Matplotlib 教程
- Scipy 教程
- Pytorch 教程
- TensorFlow 教程
- Ollama 教程
- 机器 教程
- AI Agent(智能体)
- scikit-learn 教程
- R 教程
- OpenCV 教程
- NLP 教程
- Selenium 教程
- Julia 教程
- 量化交易
- Dash 教程
- 移动端
- Android 教程
- Swift 教程
- jQuery Mobile 教程
- ionic 教程
- Kotlin 教程
- 开发工具
- VS Code 教程
- PyCharm 教程
- Swagger 教程
- RESTful API 教程
- Eclipse 教程
- Git 教程
- Svn 教程
- Markdown 教程
- XML 教程
- XML 教程
- DTD 教程
- XML DOM 教程
- XSLT 教程
- XPath 教程
- XQuery 教程
- XLink 教程
- XPointer 教程
- XML Schema 教程
- XSL-FO 教程
- SVG 教程
- ASP.NET
- ASP.NET 教程
- C# 教程
- PowerShell 教程
- Web Pages 教程
- Razor 教程
- MVC 教程
- Web Forms 教程
- Web Service
- Web Service 教程
- WSDL 教程
- SOAP 教程
- RSS 教程
- RDF 教程
- 网站建设
- HTTP 教程
- 网站建设指南
- 浏览器信息
- 网络协议
- 网站主机教程
- TCP/IP 教程
- W3C 教程
- 网站品质
Copyright © 2013-2025 菜鸟教程 runoob.com All Rights Reserved. 备案号:闽ICP备15012807号-1 微信关注
Từ khóa » Html5 Img Alt
-
HTML Img Alt Attribute - W3Schools
-
HTML Alt Attribute - W3Schools
-
: The Image Embed Element - HTML - MDN Web Docs - Mozilla
-
Image ALT Tag Tips For HTML - Accessibility At Penn State
-
HTML Img Alt Tags For SEO Best Practice - Search Engines Love ...
-
HTML Img Alt Attribute - Dofactory
-
An “img” Element Must Have An “alt” Attribute, Except Under Certain ...
-
HTML |
Alt Attribute - GeeksforGeeks
-
Alt Attribute - Wikipedia
-
HTML Element: Img: Alt | Can I Use... Support Tables For HTML5 ...
-
Why An HTML Image Alt Text Doesn't Show On Hover - Computer Hope
-
HTML5
Tag Alternative Image [duplicate] - Stack Overflow
-
HTML Img Alt Attribute - W3Schools