Think of <title>
like alt
, think of <description>
like <figcaption>
Your <title>
should describe the image sufficiently to provide a user with an understanding of what the image contains.
If it is a complex image, or the image plays a vital role in an article that necessitates more details then use <description>
.
Deque did a great test of different methods and found that your second version was the most reliable with a title
and description
linked via aria-labelledby
and IDs, so use that.
Yes google will still reference them as images without xmlns
served inline (provided you serve your page as mime type text/html
otherwise you will get rendering issues). For external images I would leave it in, it is such a minor optimisation it isn't worth it.
Inline SVGs do not get indexed as far as I am aware in Google Image Search (but their content still contributes to your SEO in Google Search Algorithms slightly so it is still worth having <description>
where appropriate.)
SVGs will always render if inline (assuming the browser supports SVG which is very likely).
Yes include <desc>
if the image is sufficiently complex that you can't describe it with <title>
in 20 words or less (general rule).
final thought - alt
tags, titles
etc. are all about accessibility, don't worry about them for SEO keywords as you will end up damaging usability. I know you didn't mention that but I thought I would put it in here for clarity.
p.s. - Next time, maybe limit this to 1 or 2 questions at once as that was a lot to answer!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…