-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Explain how to set descriptive alt text as well as caption #11082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5634,7 +5634,8 @@ The link text will be used as the image's alt text: | |
|
||
An image with nonempty alt text, occurring by itself in a | ||
paragraph, will be rendered as a figure with a caption. The | ||
image's alt text will be used as the caption. | ||
image's alt text will be used as the caption. To set alt text | ||
as well as a caption, use the 'alt' link_attribute (see below). | ||
|
||
 | ||
|
||
|
@@ -5657,7 +5658,7 @@ and the caption and figure tags will be omitted. | |
|
||
Attributes can be set on links and images: | ||
|
||
An inline {#id .class width=30 height=20px} | ||
An inline {#id .class width=30 height=20px alt="Alt text"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not a good example, because in this inline image, the alt text will be set from the image description. Thus, you can just do |
||
and a reference ![image][ref] with attributes. | ||
|
||
[ref]: foo.jpg "optional title" {#id .class key=val key2="val 2"} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest using
`alt`
instead of'alt'
.