You're designing a webpage where you want to ensure that the distance between lines of text is 1.5 times the size of the text. How would you achieve this using CSS?
- line-height: 1.5em;
- line-height: 1.5x;
- line-height: 150%;
- line-spacing: 1.5;
To ensure that the distance between lines of text is 1.5 times the size of the text, you can use the line-height property in CSS. You can set it to 150%, which is equivalent to 1.5 times the font size. Alternatively, you can use line-height with an em value, like 1.5em, which achieves the same effect.
Loading...
Related Quiz
- Which of the following is NOT a unit for font-size in CSS?
- Which tool can be used to automatically add vendor prefixes to CSS properties?
- In a responsive design, you have a sidebar that should stick to the top after scrolling past its initial position but stop sticking when it reaches the footer. Which positioning property would you apply to the sidebar?
- What is the main advantage of using a modular CSS approach?
- How can you make the text of an element bold using CSS?