HTML
CSS
PHP
Deno
Examples
Do It Yourself
Blog
Type in your code below
Run
<!DOCTYPE html> <html> <head> <style> p { /* Predefined related styles */ position: relative; color: blue; text-align: center; /* End of predefined related styles */ top: -40px; left: 20px; z-index: 5; /* Other styles */ border-style: solid; border-color: black; border-width: 5px; padding: 10px; font-size: 21px; } </style> </head> <body> This gives a keyword value to the <code>position</code> property, other values that can be given top position are <code>absolute</code>, <code>fixed</code>, <code>static</code>, <code>sticky</code>. it also give the predefined colorname <code>blue</code> for the type of color and <code>text-align</code> for the text alignment. <p>I am positioned relative.</p> </body> </html>
Related Examples
CSS Units Pre-Defined Keyword Values Example
CSS Unit String Values Example
CSS Units Relative Values Example