How to create image in html and css

How to create image in html and css

First, we prepare the image to be displayed. To insert an image, we use the tag

<img src="image_url">

In this case study, the image is in one location with the index.html file, and the image file is named maps.png. So, for the image url address, we only write the file name. The image tag will be like this

<img src="maps.png">

Next, we create a style.css file to style the image:

.image{
    border-radius: 15px;
    }

 Then , link css to html by type:

<link rel="stylesheet" type="text/css" href="style.css">

Tutorial video how to create image in html and css

 


Conclusion:


In the index.html file, you can type:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Show Image</title>
</head>
<link rel="stylesheet" type="text/css" href="style.css">
<body>
    <img src="maps.png" class="image">

</body>
</html>

style.css file, you can type:
.image{
    border-radius: 15px;
    }

see you next time

0 Response to "How to create image in html and css"

Posting Komentar