DEV Community

Discussion on: 10 Examples of a Good 👩‍💻🧑‍💻 Developer Portfolio 💼 for Your Inspiration 🦄

Collapse
 
kerthin profile image
Roden

To insert an image on a website via HTML, you can use the <img> tag and use the src attribute to specify the path to the image relative to the html file. Let's say you have a file index.html and next to it there is a folder images and in it a picture car.jpg. In that case, it's for you need to write the img tag like this: <img src="images/car.jpg">

Or you can use css. To do this, write the background-image property in the class, and then use the url to specify the path to the image.
Example:
.image {
background-image: url('images/car.jpg');
}

Collapse
 
ngowi_inc profile image
Emmanuel C. Ngowi

Thank you very much