-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHTML-img-tag.html
37 lines (34 loc) · 1.09 KB
/
HTML-img-tag.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Image Tag</title>
<style>
img{
display: block; /*to img tag a block element,by default img tag is an inline element*/
width: 50%;
}
#center-img{
margin-left: auto;
margin-right: auto;
width: 10%;
/*image positioned at center */
}
#float-img{
border: 1px solid #1428c0;
float: right;
margin: 8px 0 0 20px;
padding: 4px;
width: 200px;
}
</style>
</head>
<body>
<img src="img/birds.png" alt="">
<img id="center-img" src="img/arrow.png" alt="">
<p>
<img id="float-img" src="img/pencil.png" alt="">
Pencils create marks by physical abrasion, leaving a trail of solid core material that adheres to a sheet of paper or other surface. They are distinct from pens, which dispense liquid or gel ink onto the marked surface.</p>
</body>
</html>