WEB-DEVELOPMENT-FOUNDATION practice question 2 of 15
What is one of the possible values of the text-align property?
Full set: 75 questionsThe 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.
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.
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/
Keep practicing
Take the free WEB-DEVELOPMENT-FOUNDATION practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other WEB-DEVELOPMENT-FOUNDATION practice questions
- Question 3What is matched by the :hover selector?
- Question 4What describes the matches resulting from the img: first-child selector?
- Question 5Which two color definitions are valid for use with CSS? Choose 2 answers.
- Question 8What does the timelines tool of Safari Web Inspector enable a developer to do?
- Question 9Developers consider three platforms for viewport sizes. What is one of them?
- Question 10Which CSS unit is a relative unit?
