5
A Cascading Style Sheet (CSS) is a way of defining how the elements of an HTML document will look. Essentially, A CSS is used to separate the style and appearance of an HTML page from the content of that page:
HTML — content of a web page
CSS — style of the web page
There are three ways to use CSS:
CSS code inside an HTML tag using the style attribute:
<p style="font-size: 120%">...</p>
CSS inside the head section of an HTML document using the <style>...</style> element:
<head> <title>A first website</title> <style> p {font-size: 120%;} </style> </head>
CSS code in an external file (in this case style.css)
p {font-size: 120%;}
Of these the last is the best choice and everyone does it this way. It allows a single file to hold all the styles for a website; it also means that different web pages can use the same CSS file and changing the styles in the file will change the styles globally throughout the website.