HTML and CSS Certification 2025 – 400 Free Practice Questions to Pass the Exam

Image Description

Question: 1 / 400

What does the text-align property do in CSS?

It sets the vertical alignment of text

It sets the horizontal alignment of text

The text-align property in CSS is specifically designed to control the horizontal alignment of inline content, typically text, within a block-level element. By using this property, you can align text to the left, center it, or align it to the right, depending on the value assigned.

For example, when you use text-align: center; within a CSS rule for a paragraph tag, all text within that paragraph will be centered within its parent container. This property does not affect the vertical alignment of text, nor does it have any impact on the font style or color. Its primary function is to manage how text is arranged along the horizontal axis of the containing element, making it an essential tool for text layout in web design.

Get further explanation with Examzify DeepDiveBeta

It changes the font style of text

It defines the text color

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy