Skip to content

Commit 80c280c

Browse files
committed
css exercises done
1 parent 589ccb6 commit 80c280c

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

css/exercises/index.html

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,33 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width">
66
<title>CSS Exercises</title>
7-
<link href="style.css" rel="stylesheet" type="text/css" />
7+
<style>
8+
body {
9+
background-color: yellow;
10+
}
11+
12+
p {
13+
color: green;
14+
}
15+
16+
h1 {
17+
font-size: 36px;
18+
}
19+
20+
</style>
21+
<link rel="stylesheet" type="text/css" href="styles.css">
822
</head>
923
<body>
1024
<script src="script.js"></script>
1125
<!-- You do not need to do anything with script.js right now! Later, we will learn how to add JavaScript to websites! --->
12-
<h1>My Very Cool Web Page</h1>
13-
<h2>Why this Website is Very Cool</h2>
14-
<ol>
26+
27+
<h1 class="center">My Very Cool Web Page</h1>
28+
<h2 class="center">Why this Website is Very Cool</h2>
29+
<ol id="list-color">
1530
<li>I made it!</li>
1631
<li>This website is colorful!</li>
1732
</ol>
18-
<h2 id="cool-text">Why I love Web Development</h2>
33+
<h2 class="center" id="cool-text">Why I love Web Development</h2>
1934
<p>Web Development is a very cool skill that I love learning!</p>
2035
<p>I love making websites because all I have to do is reload the page to see the changes I have made!</p>
2136
</body>

css/exercises/styles.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
/* Start adding your styling below! */
2+
3+
.center {
4+
text-align: center;
5+
}
6+
7+
#cool-text {
8+
color: blue;
9+
}
10+
11+
#list-color {
12+
color: peru;
13+
}

0 commit comments

Comments
 (0)