Specifying sizes
There are many different ways of specifying sizes. The most useful are the units em
(where the font size of the parentThe node "above" a node in a tree, connected by an edge. element has the value 1) and rem
(where the font size in the html elementAn element for the entire document. has the value 1). In general, it is best to specify sizes of various elements relative to each other so that the same look is preserved when, for example, a window is resized.
Other units of measurements include a pixel (or px
), which is the size of a dot on the screen (which will depend on the monitor being used), a point (or pt
), which is 1/72 of an inch, and percentage (or %
), where 100 percent is equal to 1 em when referring to a font (and otherwise relative to the size of the container, which we will discuss later).
Try adjusting the size values in the example to form a better understanding of different units.
Note:
Hints:
- undefined