Which property in CSS is used to align text to the center?
- align-text: center;
- center-text: horizontal;
- text-align: center;
- text-center: horizontal;
To align text to the center in CSS, you can use the text-align property and set it to the value center. This will horizontally center-align the text within its containing element.
Loading...
Related Quiz
- You are tasked with ensuring that all hyperlinks have no underlines but should be underlined when hovered over. How would you implement this using CSS?
- 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?
- You are developing a website where you want to use modern CSS features not yet supported in all browsers. How can you ensure compatibility without manually writing fallbacks?
- The technique where a low-quality font is shown first and then replaced by a higher-quality font when it's loaded is known as ________.
- What is the main advantage of using CSS-in-JS?