+ 2

How can i put text on image in HTML

can I put Tha Text on any image in HTML or use any other program

23rd Jun 2017, 11:34 PM
Taha Usmani
Taha Usmani - avatar
2 Answers
+ 5
You can put text on image in Html by two ways: + use css 'background-image' property to set one to your text block container; + use css 'position" property to position two different html element over each other, one containing the image (could be the <img> html element, or any other styled with the 'background-image' property) and the second for the text... In most of common cases, the first solution is easiest and enough to do it ^^ Check this little code which use both technique to do some fade effect only to image, not to the overlay text: https://code.sololearn.com/WlkjRum5ePcG/#html
24th Jun 2017, 5:25 AM
visph
visph - avatar