forked from LaunchCodeEducation/javascript-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
53 lines (40 loc) · 1.38 KB
/
Copy pathindex.html
File metadata and controls
53 lines (40 loc) · 1.38 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
49
50
51
52
53
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>CSS Exercises</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script src="script.js"></script>
<!-- You do not need to do anything with script.js right now! Later, we will learn how to add JavaScript to websites! --->
<!-- External CSS example -->
<div id="external">
<h2>Example - External CSS</h2>
<p>The id for this div is an external file, linked in the heat above.</p>
</div>
<!-- inline CSS example -->
<div style="color: rgb(82, 25, 25); background-color: #4dbdc5; text-align: center; border-radius: 20px; padding: 5px 10px;" >
<h2>Example - Inline CSS</h2>
<p>The CSS for this div is defined inline and has on any other part of the page</p>
</div>
<!-- Internal CSS -->
<div class="internal">
<h2>Example - Internal CSS</h2>
<p>This div is being styled through a CSS class placed at the bottom of the body.</p>
</div>
<style>
.internal{
color:ghostwhite;
text-align: center;
background-color: #444;
margin-top: 20px;
border-radius: 10px;
padding: 40px;
width: 50vw;
margin: 20px auto;
}
</style>
</body>
</html>