Inheritance
Read page 240 before attempting this activity.
Try it for yourself
Instructions
Read page 240 before attempting this activity.
- Remove the three CSS rules, and replace them with one rule that does the same thing using inheritance.
- This one rule should change all the text to a sans-serif font, and make it all bold.
HTML
1
<body>
2
<h1>Heading</h1>
3
<p>This is a paragraph.</p>
4
<p>This is a paragraph.</p>
5
<blockquote>This is a blockquote.</blockquote>
6
</body>
CSS
1
h1{
2
font-family: sans-serif;
3
font-weight: bold;
4
}
5
6
p{
7
font-family: sans-serif;
8
font-weight: bold;
9
}
10
11
blockquote {
12
font-family: sans-serif;
13
font-weight: bold;
14
}
JavaScript
1
</script><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script><script>