Skip to content

Commit 67e91fe

Browse files
committed
psedo class
1 parent 389d92c commit 67e91fe

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h3>What is HTML?</h3>
7777
<p>In HTML, each element is made up of 3 parts:</p>
7878

7979
<ol>
80-
<li>The opening tag</li>
80+
<li class="first-li">The opening tag</li>
8181
<li>The closing tag</li>
8282
<li>The actual element</li>
8383
</ol>
@@ -99,7 +99,9 @@ <h3>Why should you learn HTML?</h3>
9999
</p>
100100

101101
<ul>
102-
<li>To be able to use the fundamental web dev language</li>
102+
<li class="first-li">
103+
To be able to use the fundamental web dev language
104+
</li>
103105
<li>
104106
To hand-craft beautiful websites instead of relying on tools like
105107
Worpress or Wix

starter/03-CSS-Fundamentals/style.css

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,41 @@ aside {
6464
border-top: 5px solid #1098ad;
6565
border-bottom: 5px solid #1098ad;
6666
}
67-
body {
68-
background-color: orchid;
67+
/* body {
68+
background-color: orchid;
69+
} */
70+
/* .first-li {
71+
font-weight: bold;
72+
} */
73+
li:first-child {
74+
font-weight: bold;
6975
}
76+
li:last-child {
77+
font-style: italic;
78+
}
79+
/* li:nth-child(even) {
80+
color: red;
81+
} */
82+
/* misconception- doesn't work */
83+
/* article p:first-child {
84+
color: red;
85+
} */
86+
/* Styling hyperlinks */
87+
a:link {
88+
color: #1098ad;
89+
text-decoration: none;
90+
}
91+
a:visited {
92+
color: #1098ad;
93+
}
94+
a:hover {
95+
color: orangered;
96+
font-weight: bold;
97+
text-decoration: underline orangered;
98+
}
99+
a:active {
100+
background-color: black;
101+
font-style: italic;
102+
}
103+
104+
/* LVHA */

0 commit comments

Comments
 (0)