1 naming
I recommend using a completely lowercase class name and ID, with multiple words – to connect. For example: Andy-budd is much clearer than Andybudd.
2 ID and Class selector
ID Selector Format:
{ text-align:Center; color:red;}
Class selector:
{ text-align:center;}
3 DTD and DOCTYPE
DTD: Document type definition, which defines what is allowed in a particular version of HTML, does not allow the browser to check the validity of the page through these rules. is a set of machine-readable rules.
DOCTYPE: Declares which DTD to use, and the browser knows which HTML version to use.
Dtd:document type definition, which defines what is allowed in a particular version of HTML, does not allow the browser to check the validity of the page through these rules. is a set of machine-readable rules.
DOCTYPE: Declares which DTD to use, and the browser knows which HTML version to use.
and promiscuous mode corresponds to the standard mode.
4 Common selectors
Element selector: p {}
Descendant selector: div p {}
ID selector: #demo {}
Class selector:. Demo {}
With these four kinds of selectors you can locate many and many elements.
1 CSS Common sense