Skip to content

Commit e57b581

Browse files
author
parshurampatil
committed
id and class selector
1 parent dc95c5a commit e57b581

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ <h2>The Basic Language of the Web: HTML</h2>
3939
width="50"
4040
/>
4141

42-
<p>Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027</p>
42+
<p id="author">
43+
Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027
44+
</p>
4345

4446
<img
4547
src="img/post-img.jpg"
@@ -115,20 +117,20 @@ <h3>Why should you learn HTML?</h3>
115117
<h4>Related posts</h4>
116118

117119
<ul>
118-
<li>
120+
<li class="related">
119121
<img
120122
src="img/related-1.jpg"
121123
alt="Person programming"
122124
width="75"
123125
width="75"
124126
/>
125127
<a href="#">How to Learn Web Development</a>
126-
<p>By Jonas Schmedtmann</p>
128+
<p class="related-author">By Jonas Schmedtmann</p>
127129
</li>
128130
<li>
129131
<img src="img/related-2.jpg" alt="Lightning" width="75" heigth="75" />
130132
<a href="#">The Unknown Powers of CSS</a>
131-
<p>By Jim Dillon</p>
133+
<p class="related-author">By Jim Dillon</p>
132134
</li>
133135
<li>
134136
<img
@@ -138,11 +140,13 @@ <h4>Related posts</h4>
138140
height="75"
139141
/>
140142
<a href="#">Why JavaScript is Awesome</a>
141-
<p>By Matilda</p>
143+
<p class="related-author">By Matilda</p>
142144
</li>
143145
</ul>
144146
</aside>
145147

146-
<footer> <p>Copyright &copy; 2027 by The Code Magazine.</footer></p>
148+
<footer>
149+
<p id="copyright">Copyright &copy; 2027 by The Code Magazine.</p>
150+
</footer>
147151
</body>
148152
</html>

starter/03-CSS-Fundamentals/style.css

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,28 @@ li {
3636
font-size: 20px;
3737
}
3838

39-
footer p {
39+
/* footer p {
4040
font-size: 16px;
41-
}
41+
} */
42+
43+
/*article header p {
44+
font-style: italic;
45+
}*/
4246

43-
article header p {
47+
#author {
4448
font-style: italic;
49+
font-size: 18px;
50+
}
51+
52+
#copyright {
53+
font-size: 16px;
54+
}
55+
56+
.related-author {
57+
font-size: 18px;
58+
font-weight: bold;
59+
}
60+
61+
.related {
62+
list-style: none;
4563
}

0 commit comments

Comments
 (0)