User:Zuhui/Prototyping/HTML/CSS: Difference between revisions
< User:Zuhui | Prototyping
(Created page with "=Basic Structure=") |
|||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Basic | |||
=Basic= | |||
[https://pad.xpub.nl/p/HTML-club 121124 with manetta] | |||
==HTML== | |||
HTML basic structure | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<title></title> | |||
</head> | |||
<body> | |||
</body> | |||
</html> | |||
==CSS== | |||
===:root=== | |||
:root{ | |||
--(name of the var):(color, fontsize etc); | |||
} | |||
//-- two dash is mendatory | |||
//when use | |||
ex) font-size: var(--main-font-size); | |||
===Position=== | |||
'''position: absolute;''' | |||
it is fixed on the designated position | |||
'''position: fixed;''' | |||
it is fixed on the designated position + it stays float in the position even if the page is being scrolled | |||
'''position: relative;''' | |||
position relative to the previous element | |||
'''default margin''':if you don't want the default margin-> margin: unset; or margin:0; |
Latest revision as of 12:37, 12 November 2024
Basic
HTML
HTML basic structure
<!DOCTYPE html> <html> <head> <title></title> </head> <body> </body> </html>
CSS
:root
:root{ --(name of the var):(color, fontsize etc); } //-- two dash is mendatory
//when use ex) font-size: var(--main-font-size);
Position
position: absolute; it is fixed on the designated position
position: fixed; it is fixed on the designated position + it stays float in the position even if the page is being scrolled
position: relative; position relative to the previous element
default margin:if you don't want the default margin-> margin: unset; or margin:0;