Are those values that must be specified in the attributes and vary depending on the attribute used. In the table below you can see how they can be expressed, and some of them are equivalent, they produce the same result in this case is up to you to decide which one to use according to your tastes, needs and habits.
Unit of measure:
I used the attribute font-size: example; with the values and the parameters reported in the result column.
Unit of measure | Description | Example | Result |
cm | Cm | font-size: 1cm; | Result |
mm | Mm | font-size: 7mm; | Result |
in | Inch | font-size: 0,25in; | Result |
pt | Points | font-size: 12pt; | Result |
pc | Pica(=12 points) | font-size: 2pc; | Result |
px | Pixels | font-size: 25px; | Result |
em | Mon. letter m | font-size: 2,5em; | Result |
ex | Character height x | font-size: 3ex; | Result |
Absolute values:
I used the attribute font-size: value; with the values and the parameters reported in the result column.
Value | Syntax description | Result |
xx-small | font-size: xx-small; | Result |
x-small | font-size: x-small; | Result |
small | font-size: small; | Result |
medium | font-size: medium; | Result |
large | font-size: large; | Result |
x-large | font-size: x-large; | Result |
xx-large | font-size: xx-large; | Result |
Values:
I used the attribute font-size: value; with the values and the parameters reported in the result column.
Value | Syntax description | Result |
smaller | font-size: smaller; | Result |
larger | font-size: larger; | Result |
Colors:
I used the attribute color: value; with the values and the parameters reported in the result column.
Value | Syntax description | Result |
name | color: green | Result |
value of the hexadecimal | color: #008000; | Result |
value RGB | color: rgb(0,128,0); | Result |
percentage RGB | color: rgb(0%,50%,0%); | Result |
Positioning The Box
Attributes and Parameters to define and place a box, an example of a reference:
<div style=”position: absolute; left: 100px; top: 50px; z-index: 5;”> content </div>
with values and parameters shown in the table below.
Attribute | Parameter | Description |
position | absolute – static – related | The way in which can be placed in a container (box). |
left | cm – mm – in – pt – pc– px – ex – em | the distance of the container from the left edge of the browser window. |
top | cm – mm – in – pt – pc– px – ex – em | the distance of the container from the top edge of the browser window. |
height | cm – mm – in – pt – pc– px – ex – em | The height of the container when it is positioned in absolute mode. |
width | cm – mm – in – pt – pc– px – ex – em | The width of the container when it is positioned in absolute mode. |
overflow | visible – hidden – scroll | Content that exceeds the Width Height of the box container. |
visibility | visible – hidden – | Visibility or less of a container (box). |
Z-index | xx (positive numbers) | The order of priority of display of a container (box). |