-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinline&Block.html
More file actions
48 lines (43 loc) · 1.31 KB
/
inline&Block.html
File metadata and controls
48 lines (43 loc) · 1.31 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Inline&Block</title>
</head>
<body>
<h3>Concept of Inline and Block</h3>
<p>this is a paragraph</p>
<p>this is also a paragraph</p>
<br>
<hr>
<br>
<span>this is span</span>
<span>this is also a span</span>
<br>
<br>
<hr>
<hr>
<br>
<p style="border: 2px solid red;">this is a paragraph</p>
<p style="border: 2px solid blue;">this is also a paragraph</p>
<br>
<hr>
<hr>
<br>
<span style="border: 2px solid green;">this is span</span>
<span style="border: 2px solid orange;">this is also a span</span>
</body>
</html>
----------------------------------------------------------------------
<!-- BLOCK AND INLINE ELEMENTS
BLOCK:
1)A block-level elements always start on a new line.
2)A block-level elements always takes up the full width available.
<p>,<h1>,<div>
Inline:
1)A Inline elements doesnot start on a new line.
2)An Inline elementsonly takes up as much width as necessery.
<span>,<strong>,<b>,<button> -->
-----------------------------------------------------------------------