How do I write text over an image?

How do I write text over an image?


I’m trying to work on my portfolio page, but I cant seem to figure out how to put the words “portfolio” on the image I have. I tried the z-index tag as well as other solutions, but nothing seems to work. the word is only under the picture.
Here is my code:


You have the same image as both the background image of a div in your css (which is what you want if you’d like to have text on top of it) and also as an element in your html (which is what you dont want.)

Delete the image from your HTML. If you’re looking to make the image take up the entire screen, google “Responsive Full Screen Background” for a bunch of resources… heres one

If you just want the image to take up the background of one div, not the entire page, google Responsive Background Image in Div.


Thank you I will try that!