+ 2
Which tag should be used to write text on an image on the web page ?
4 Respostas
+ 1
I don't get it u want an alternative like Alexander Sokolov said
or u want image as background and want other elements on it if u want this set image as background using css to wrapping div like
<div id ="wrapper">
</div>
css:
#wrapper {
background-image: url("image.png");
}
+ 5
Hello, Vishal Soni !
The alt attribute sets the alternative text for images. This text allows you to get text information about the image when the download of images is disabled in the browser. Since images are downloaded after the browser receives information about it, the text replacing the picture appears earlier. And already as you load the text will be replaced by the image.
Good luck with programming on SoloLearn!
https://www.sololearn.com/learn/HTML/1030/?ref=app
+ 1
https://code.sololearn.com/WUAdbd6f6c6J/?ref=app
0
if you are using plain <img>, you can use <span>, <p>, <div> to place the text in.
if the text belongs clearly to the image (i.e. image caption in article), you can use <figure> to wrap <img> and <figcaption>. => helps search engines to understand that the text is additional info that belongs to the image. => better indexing in search engines and more traffic (via image search).