Summary 5
“Chapter 4 - Styln’ With CSS”
Topic 1 - Font-Size Property
It is possible to change the font size of an element by setting the ‘font-size’ which changes it from the default of the browser’s style sheet. It is important to understand the hierarchy of how font sizes are affected through the units used (the difference
between absolute and relative units). If the ‘font-size’ of the body isn’t set it goes to the default for each heading element (h1 through h6) but if it is set to value in pixels then each heading element’s value would be multiplied by
that pixel amount.
Topic 2 - Text-Indent Property
The ‘text-indent’ property can be used within a text box to set a starting position for the text within the element. The value can be set as a positive number to indent to the right or as a negative value to move the text to the left. The unit of this
value should be set in ems so that the indentation can remain proportional even if the font is changed in any way.
Topic 3 - Line-Height Property
The ‘line-height’ property is the CSS version of ‘leading’ which allows you to adjust the spacing between lines of text. It can be set with any unit type depending on the preferred appearance of the type and how it should look when the screen size is
adjusted. It is important to know how different heading elements are affected by ‘line-height’ because they all have different line heights by default, and sometimes need to be adjusted according to your preference for the appearance of
the text.