Answer the question
In order to leave comments, you need to log in
How to insert text in SVG for SEO crawler?
I have a logo on my site
<h1>
<svg></svg>
<h1/>
h1
. title
document.querySelector('h1').innerText
Answer the question
In order to leave comments, you need to log in
As innerText, no way.
SVG is ordered by other validation algorithms relative to HTML markup, so ...
Purely theoretically, you can try to use h1 directly in the SVG markup and, if it is written as it is, and not through, for example, Embed, it will be read.
But there is an opinion that you just want to force search engine to see the text. If so:
1. Don't use the logo in h1
2. Use img object which will suck the svg file. And here already use alt and title
Well, the main thing, I agree with the speaker in the comments: the request was made incorrectly. And the task, most likely, is also set.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question