In the following exercises, make use of the following declarations(one per line) background-color: silver; font-size: larger; Theres will be referred to as " the background declaration" and "the text declaration," respectively. (a)(5marks):Write CSS style rules that apply the background declaration to div elements and the text declaration to strong elements respectively.
时间: 2023-12-03 16:42:29 浏览: 73
CSS教程:背景background属性应用
5星 · 资源好评率100%
To apply the background declaration to div elements and the text declaration to strong elements, you can use the following CSS style rules:
```css
div {
background-color: silver;
}
strong {
font-size: larger;
}
```
In the above code, the `div` selector selects all `div` elements in the HTML document and applies the `background-color: silver` rule to them. Similarly, the `strong` selector selects all `strong` elements in the HTML document and applies the `font-size: larger` rule to them.
阅读全文