Skip to content
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

Images alt text #200

Open
fconil opened this issue Jul 31, 2024 · 1 comment
Open

Images alt text #200

fconil opened this issue Jul 31, 2024 · 1 comment

Comments

@fconil
Copy link

fconil commented Jul 31, 2024

Hi,
Thanks for your site that I use as my Markdown syntax reference.

I saw in Basic syntax as well as in the reference implementation documentation that alt text is the text inside the brackets. But that's not what I see on your page or with my MkDoc framework.

It seems that it is the Title which is in quotation marks after the path or URL that is used as alternate text.

I do not know was it made of the text that is placed inside the brackets.

Did I missed something ?

Regards

@wyattscarpenter
Copy link

Hi @fconil,

I'm not the author of this project, but I was looking into this today and I believe the basic syntax description is correct.

Here's an example from basic syntax

image

Here's what the html looks like when I inspect element in firefox:

<img
srcset="https://mdg.imgix.net/assets/images/san-juan-mountains.jpg?auto=format&amp;fit=clip&amp;w=480 480w,
              https://mdg.imgix.net/assets/images/san-juan-mountains.jpg?auto=format&amp;fit=clip&amp;q=40&amp;w=1080 1080w"
             src="https://mdg.imgix.net/assets/images/san-juan-mountains.jpg"
             class="img-fluid"
             title="San Juan Mountains"
             alt="The San Juan Mountains are beautiful!"
             loading="lazy"
             sizes="100vw">

As you can see, it is the title that is in quotation marks after the path or URL that gets used as the title html attribute, which also displays on hover. The alt text is the text inside the brackets, and it would display if the image failed to display.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants