Skip to content

Commit a4bf96f

Browse files
committed
styling hyperlinks
1 parent 2a69aa2 commit a4bf96f

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

starter/02-HTML-Fundamentals/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h5>The Basic Language of the Web: HTML</h5>
1616
<h6>The Basic Language of the Web: HTML</h6>
1717
-->
1818

19-
<header>
19+
<header class="main-header">
2020
<h1>📘 The Code Magazine</h1>
2121

2222
<nav>
@@ -115,7 +115,7 @@ <h3>Why should you learn HTML?</h3>
115115
<aside>
116116
<h4>Related posts</h4>
117117

118-
<ul>
118+
<ul class="decoration">
119119
<li>
120120
<img
121121
src="img/related-1.jpg"

starter/02-HTML-Fundamentals/style.css

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ h4,
55
p,
66
li {
77
font-family: sans-serif;
8+
color: #444;
9+
}
10+
h1,
11+
h2,
12+
h3 {
13+
color: #1098ad;
814
}
915
h1 {
10-
color: aquamarine;
1116
font-size: 26px;
1217
text-transform: uppercase;
1318
font-style: italic;
@@ -54,3 +59,42 @@ header p {
5459
.decoration {
5560
list-style: none;
5661
}
62+
.main-header {
63+
background-color: #f7f7f7;
64+
}
65+
aside {
66+
background-color: #f7f7f7;
67+
border-top: 5px solid #1098ad;
68+
border-bottom: 5px solid #1098ad;
69+
}
70+
li:first-child {
71+
font-weight: bold;
72+
}
73+
li:last-child {
74+
font-style: italic;
75+
}
76+
li:nth-child(even) {
77+
/* color: red; */
78+
}
79+
/* Misconception: this won't work */
80+
article p:first-child {
81+
/* color: rgb(146, 17, 17); */
82+
}
83+
84+
/* styling links */
85+
a:link {
86+
color: #1098ad;
87+
text-decoration: none;
88+
}
89+
a:visited {
90+
color: #1098ad;
91+
}
92+
a:hover {
93+
color: orangered;
94+
font-weight: bold;
95+
text-decoration: underline wavy orangered;
96+
}
97+
a:active {
98+
background-color: black;
99+
font-style: italic;
100+
}

0 commit comments

Comments
 (0)