Verified
How can you change the background color of a webpage using CSS?
✔✔You can change the background color by using the `background-color` property in the CSS
rule for the body element.
What property is used to change the font size in CSS?
✔✔The `font-size` property is used to change the font size of text in CSS.
How do you select an element with the class name "highlight"?
✔✔You select an element with the class name "highlight" using the dot notation: `.highlight`.
What is the purpose of the `margin` property in CSS?
✔✔The `margin` property is used to create space outside an element's border.
What is a CSS selector?
✔✔A CSS selector is a pattern used to select the elements you want to style.
1
, How can you apply multiple styles to a single HTML element?
✔✔You can apply multiple styles to a single HTML element by separating each style with a
semicolon in the CSS rule.
What does the `float` property do in CSS?
✔✔The `float` property is used to position an element to the left or right within its container,
allowing text and inline elements to wrap around it.
What is the difference between `padding` and `margin`?
✔✔`Padding` creates space inside an element's border, while `margin` creates space outside the
border.
How can you create a CSS comment?
✔✔You create a CSS comment by enclosing the text within `/* comment here */`.
What is the purpose of the `z-index` property?
✔✔The `z-index` property controls the stacking order of overlapping elements on the z-axis.
2