


When browser vendors bend the standards and do things that don't follow the rules, they can cause problems, or at least confusion. One example is the way some browsers handle alt attributes (often incorrectly called alt tags), such as Internet Explorer for Windows, which has a large number of users.
Alt text is not used as a tool tip, or to be more precise, it does not provide additional descriptive information for the image. Instead, the title attribute should be used to provide additional descriptive information for the element. This information is displayed as a tool tip in most image browsers, although manufacturers are free to render the title attribute text in other ways.
A lot of people seem confused by these two properties (this question has been popping up on the Web Standards Group mailing list lately), so I wrote down my thoughts on how to use them.
alt attribute
is a user agent (UA) that cannot display images, forms or applets. The alt attribute is used to specify replacement text. The language of the replacement text is specified by the lang attribute. Source: How to specify alternate text.
The Alt attribute (note that it is an "attribute" rather than a "label") includes replacement instructions, which is required for images and image hotspots. It can only be used in img, area, and input elements (including applet elements). For input elements, the alt attribute is intended to replace the submit button image. For example: .
Use the alt attribute to provide text descriptions for viewers who cannot see the images in your document. This includes users who use browsers that do not natively support image display or have image display turned off, users who are visually impaired and users who use screen readers. Alt text is used to replace an image rather than provide additional descriptive text.
Think carefully before writing alt text to make sure that the text actually provides information for those who can’t see the image and that it makes sense in context. For decorative images, use an empty value (alt="", no spaces between quotes) instead of irrelevant replacement text such as "blue bullet" or "spacer.gif". Don't ignore it. If you ignore it, some screen readers will read the file name of the image file directly, and text browsers like Lynx will display the file name of the image file, and that will be of no use to your browser.
It is easiest to set alternative text for images containing text. Generally speaking, the text contained in the image can be used as the alt attribute value.
As for the length of the alternative text, take a look at what WCAG 2.0 (Website Content Availability Guidelines 2.0) says:
The length of the Alt attribute value must be less than 100 English characters or the user must ensure the replacement Keep text as short as possible.
I understand it as "as short as possible and as long as necessary".
Even if you want it to be displayed as a tool tip, do not use the alt attribute for text elements. This is not its intended use. As far as I know, this only works in Windows' IE browser and the ancient Netscape 4.* (windows version). No Mac browser displays this as a tool tip.
When browsers display alt text as a tool tip, incorrect use of the alt attribute is encouraged. Some people start writing meaningless alt text because they tend to think of it as additional descriptive information rather than a replacement that cannot display the image. Others may not want the tool tip to appear, and then completely ignore the alt attribute value. These wrong practices cause difficulties for viewers who cannot see the images.
For additional explanatory information and non-essential information, please use the title attribute.
title attribute
The title attribute provides suggested information for the element on which it is set.
Source: The title attribute.
The title attribute can be used in all tags except base, basefont, head, html, meta, param, script and title. But it's not necessary. Maybe that's why many people don't understand when to use it.
Use the title attribute to provide non-essential additional information. Most visual browsers display the title text as a tool tip when the mouse is hovering over a specific element. However, it is up to the manufacturer to decide how to render the title text. Some browsers will display the title text in the status bar. For example, early versions of the Safari browser.
A good use of the title attribute is to add descriptive text to a link, especially when the link itself is not very clear about the purpose of the link. This way visitors know where the links will take them and they won't load a page that they may not be interested in at all. Another potential application is to provide additional descriptive information for images, such as dates or other non-essential information.
The title attribute value can be set longer than the alt attribute value. Be aware, however, that some browsers will truncate text that is too long (such as tooltips or other). For example, Mozilla's core browser can only display the first 60 characters. This is considered a Mozilla bug and is something you should be aware of.
Think before using
My advice is to keep alt text to its essentials. In most applications, it should be left blank, alt="" (note that there are no spaces between the quotation marks). Think about those images, what information do they provide to those who are viewing them, what words should you use to describe it, or what information should you provide to people who cannot see the images? Will it really help someone who can't see the image to write the alt text as "Photo: CEO standing outside a building, wearing a gray suit and black tie, looking at the sky"? If you think so, then write it. In many cases, I think it's better to leave the replacement text blank.
For the title attribute, it is difficult to give strict usage instructions. I mostly use it on links that are not self-explanatory, such as the same link text on the same page, but different linked pages. Sometimes more descriptive text is provided for some buttons or form elements.
Longer Description
When an image requires a longer description than the alt attribute limits, there are some options.
The longdesc attribute can be used to provide a link to a separate page containing a text description of the image. This means linking the viewer to another page, which may cause difficulty in understanding. In addition, browser support for the longdesc attribute is inconsistent and not very good.
The longdesc attribute can contain a link to another part of the current document (an anchor) instead of linking to another page. In the Accessibility footnotes, Andy Clarke gives a good explanation of how to apply it.
Description links (D links) can be used to supplement longdesc. A description link is a regular link to a page containing alt text. The link is placed next to the image and is available in all browsers. There are many different opinions on its effectiveness, and I personally don't like this note. WCAG too, in their working draft HTML Techniques for WCAG 2.0, description links are "deprecated".
If a long description of the image is useful to any viewer, then you should consider simply displaying it within the same document, rather than linking to other pages or hiding it. So everyone can read it. This is a simple, low-tech approach.

打开img文件的方法有使用虚拟光驱软件打开、使用压缩软件打开和使用专用工具打开。详细介绍:1、使用虚拟光驱软件打开,下载并安装一个虚拟光驱软件,右键单击img文件,选择“打开方式”或“关联程序”,在弹出的对话框中选择安装的虚拟光驱软件,虚拟光驱软件会自动加载img文件,并将其作为虚拟光驱中的光盘映像,双击虚拟光驱中的光盘图标,即可打开img文件并访问其中的内容等等。

alt+=是快速求和的快捷键,使用“alt+=”快捷键的方法是:1、打开Excel表格文件;2、创建数字数据;3、用鼠标选中需要求和数据;4、按“alt+=”键,即可对所选数据进行求和。

img文件打开的方式:1、确认img文件路径;2、使用img文件打开器;3、选择打开方式;4、查看图片;5、保存图片。img文件是一种常用的图像文件格式,通常用于存储图片数据。

img是一种文件压缩格式,主要是为了创建软盘的镜像文件,它可以用来压缩整个软盘或整片光盘的内容;使用“.IMG”这个扩展名的文件就是利用这种文件格式来创建的;img文件包括3个基本节点,分别是“Ehfa_HeaderTag”、“Ehfa_File”和“Ehfa_Entry”。

title是定义网页标题的意思,位于标签内,并且是在浏览器的标题栏中显示的文本,title对于网页的搜索引擎优化和用户体验都非常重要。在编写HTML网页时,应该注意使用相关的关键词和吸引人的描述来定义title元素,以便吸引更多的用户点击和浏览。

HTML中的title显示的是网页标题标签,可以让浏览者知道当前页面的主要是讲什么的,所以每个网页都应该有一个单独的title。

alt是键盘左下角的第三个键和左箭头旁的第三个键;alt键又名交替换档键、更改键、替换键,因为它是英语单词“Alternate”(交换、替换)的缩写,大多数情况下与其它键组合使用;在没有鼠标的情况下,使用“Alt”键可以很容易地打开软件的菜单。

你的游戏会让Alt在Windows上随意跳跃吗?Alt+Tab是一个有用的快捷键,用于在多个打开的应用程序和窗口之间快速切换。然而,一些Windows用户报告说,当在全屏模式下玩游戏时,Alt+Tab功能会自动触发,他们的游戏会被最小化。目前,这个疑问可能由多个原因引起,包括键盘的自身问题,过时或损坏的键盘驱动程序等。一些Razer键盘用户指出,他们也因为RazerSynapse而遇到了这个问题。有少数用户发现与Office相关的后台任务可能会触发相同的问题。修复游戏保持AltTab键自己如果您


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Mac version
God-level code editing software (SublimeText3)

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver CS6
Visual web development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
