-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLevel2_3.html
More file actions
33 lines (31 loc) · 1.22 KB
/
Level2_3.html
File metadata and controls
33 lines (31 loc) · 1.22 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Learn CSS Level 2</title>
<link rel = "stylesheet" href = "./Level2_3.css">
</head>
<body>
<!-- we are going to learn display property in css -->
<!-- inline, block, inline-block, none -->
<!-- inline => takes only required space (no margins and no padding) -->
<!-- block => takes full space in width -->
<!-- inline-block => similar to inline but (margins and padding is available) -->
<!-- for example a block element like div uses the entire space even if the content is small -->
<!-- problem is there is wastage of space where other stuff could have fit in ... -->
<!-- inspect the below div for clarification -->
<div>
this is a div
</div>
<!-- div is a block element -->
<!-- we can change the element display div to inline using the display property-->
<!-- eg => display:inline -->
<!-- we need to customize the height or width to give the content within div just enough space -->
<!-- checkout Level2_3.css file to more information -->
<br>
<div>
this is a div
</div>
</body>
</html>