1.Classes and element selectors
BeginnerMake all paragraphs dark grey (#333) with a line height of 1.6, give paragraphs with the class note a pale yellow background and 8px padding, and make the element with the id title navy.
<h1 id="title">Notice board</h1>
<p>Classes start on Monday.</p>
<p class="note">Bring your own laptop.</p>
<p>Lunch is provided.</p>Show hint
Element selector p, class selector .note, id selector #title.
Show solution
p {
color: #333;
line-height: 1.6;
}
.note {
background: #fff8c4;
padding: 8px;
}
#title {
color: navy;
}