From the course: Making Sense of the CSS Box Model

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Changing the contents within the box

Changing the contents within the box - CSS Tutorial

From the course: Making Sense of the CSS Box Model

Start my 1-month free trial

Changing the contents within the box

- [Instructor] Working from the inside out, the first thing we can do with the CSS box is change the appearance of the contents within the box itself. Because the nature of the box is mainly as a text layout tool, a large number of the properties we have available to us relate to how text is displayed. As you've seen before, the most basic change you can make to the contents in the box is changing the font. We can change the font family, providing either a single or a list of fonts for the browser to use. We can also change the font size, font weight, and font style from normal, to italic to oblique. We can also change the appearance of text in other ways. We've already talked about letter spacing and line height. There's also a word spacing property that adds space between each word. And we can align text left, center, right or justified, and add indentation to the first line with text indent. CSS can also be used…

Contents