-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathimages.html
56 lines (52 loc) · 1.57 KB
/
images.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Working with Images</title>
</head>
<body>
<img src="cat.jpg" alt="A cute Cat" class="image-align" />
<!-- Aligning the Image -->
<img src="cat.jpg" alt="A cute Cat" align="left" class="image-align" />
<!-- Size of the image -->
<p>
<img
src="cat.jpg"
alt="A cute Cat"
width="200"
height="200"
class="image-align"
/>
This Some Text Around the Image
</p>
<!-- Styling the Image using CSS -->
<style>
.image-align {
margin: 10px;
float: left;
}
</style>
<!-- Image Links -->
<a href="https://www.google.com">
<img src="cat.jpg" alt="A cute Cat" class="image-align" />
</a>
<!-- Responsive Images -->
<img src="cat.jpg" alt="Description" /style="max-width: 100%;">
<!-- How to Load Images from External Sources -->
<img
src="https://www.w3schools.com/images/w3schools_green.jpg"
alt="W3Schools.com"
style="width: 104px; height: 142px"
/>
<!-- Lazy loading -->
<img src="cat.jpg" alt="A cute Cat" loading="lazy" class="image-align" />
<!-- Image Captioning -->
<figure>
<img src="cat.jpg" alt="A cute Cat" class="image-align" />
<figcaption>This is a cute cat</figcaption>
</figure>
<!-- Retina and High-DPI Displays -->
<img src="cat.jpg" alt="A cute Cat" srcset="image.jpg 1px, image@2x.jpg 2x" />
</body>
</html>