CSS defines how HTML components are displayed.
Whereas HTML is used to construction an online doc (it defines issues like headings and paragraphs and allows you to embed photos, movies, and different media), CSS determines the fashion of your doc.
Web page layouts, colours, and fonts are all decided by CSS. HTML is thought-about elementary, CSS is thought-about aesthetic choices.
Very similar to HTML, CSS is written as easy, plain textual content by way of a textual content editor in your laptop.
There are three essential methods so as to add CSS code to your HTML pages. CSS code could be exterior, inner, or inline.
Exterior fashion sheets are saved as .css information and can be utilized to outline the looks of a whole web site by way of a single file.
To make use of an exterior fashion sheet, your .html information should include a header part that hyperlinks to the exterior fashion sheet and appears like this:
Inner fashion sheets are CSS directions written immediately into the header of a selected .html web page.
Lastly, inline types are CSS snippets which are written immediately into HTML code and might solely be utilized to a single coding occasion.
Generally, exterior fashion sheets are the best methodology for making use of CSS on a web site. Inner fashion templates and inline styling can be utilized on a case-by-case foundation when particular person fashion modifications should be made.