-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05-15.html
33 lines (33 loc) · 1018 Bytes
/
05-15.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Div vs. Span</title>
</head>
<style>
span {
color: white;
background-color: darkgray;
}
div {
color: lightgray;
background-color: black;
}
</style>
</head>
<body>
<header>
<h1>DIVs v/s SPANs</h1>
</header>
<main>
<div>The div element provides away to identify a block of content that can be styled by CSS specified in the style element.</div>
<p>Without the style element, a div would be indistinguishable from a paragraph within a body of an HTML document.
However, paragraphs, like this aren't automatically styled unless specified in the style element.</p>
<span>Spans</span>
<span>are not blocks</span>
<span>of text,</span>
<span>so they remain</span>
<span>inline without wrapping live divs</span>
<div><p>You can even put a<span>span</span>inside of a div if there is something inside requiring<span>special styling</span></p></div>
</main>
</body>
</html>