From the course: CSS Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Text-align and text-transform

Text-align and text-transform - CSS Tutorial

From the course: CSS Essential Training

Text-align and text-transform

- [Instructor] Let's talk about the text-align and text-transform properties. The text-align property is an inheritable value and is used to align content contained within a block element. It's defined using various keyword values. The text-transform property is used to control the capitalization of the text in an element. It's also an inheritable style and used with various keyword values. Let's see how these values are applied in a CodePen example. For text-align, the keyword, center, is used to center align the text. Let's add this style to the h1 selector. It's an inheritable style, so if I add it to the parent element using the section selector, all the child elements will also be aligned. Even though this property is called text-align, this style is also applied to image elements. Continuing with the section selector, let's add the left value. This is the default value, and not surprisingly, it aligns the…

Contents