WEB-DEVELOPMENT-FOUNDATION practice question 2 of 15

What is one of the possible values of the text-align property?

Full set: 75 questions
Answer options
A: none
B: inline
C: right Correct answer
D: down
Correct Answer:
C. right
Explanation

The text-align CSS property specifies the horizontal alignment of inline-level content within a block container or table-cell box. One of its fundamental values is right, which aligns the text content to the right edge of the line box. Other common values include left, center, and justify. This property is essential for controlling the layout and readability of text on a webpage.

Why Incorrect

A. none: This is not a valid value for the text-align property. It is a common value for properties like display or border-style.
B. inline: This is a value for the display property, which determines an element's layout behavior, not the alignment of text within it.
D. down: This is not a recognized CSS value. The text-align property controls horizontal alignment, not vertical.

References

1. Mozilla Developer Network (MDN) Web Docs: The text-align property page explicitly lists right as a valid keyword value.

Source: MDN Web Docs, text-align page, "Values" section. Retrieved from https://developer.mozilla.org/en-US/docs/Web/CSS/text-align#values

2. W3C (World Wide Web Consortium) CSS Text Module Level 3: The official specification for CSS text properties defines the syntax and accepted values for text-align.

Source: W3C Candidate Recommendation, CSS Text Module Level 3, Section 8.1, "Text Alignment: the text-align property". Retrieved from https://www.w3.org/TR/css-text-3/#text-align-property

3. MIT OpenCourseWare: Course materials for web design and development cover fundamental CSS properties.

Source: MIT OCW, 6.813/6.831 User Interface Design and Implementation, Spring 2011, Lecture 4: CSS, Slide 23. Retrieved from https://ocw.mit.edu/courses/6-813-user-interface-design-and-implementation-spring-2011/resources/mit6813s11lec04/

Scroll to Top