CSS

Cascading Style Sheets

CSS stands for Cascading Style Sheets, and is a code that describes how to display HTML.

There are two kind of CSS: Internal and External.

Internal CSS

It is mixed in the HTML code. (Old school) Inline CSS is uncommon, because it slows down page loading time. A more common method is to gather all the CSS styles together and place them within <style> HTML tags. This is called an internal style sheet.

<style>

h1 { color: red; }

h2 { color: black; }

</style>

The <style> element belongs in the <head> of a web page, along with the title, description and other informational elements. An internal style sheet can contain as many CSS rules as the page needs, for as many different HTML elements as the page has.

External CSS

There is a third way websites add CSS, and that is writing it in a separate file. The benefit of this is that they can link the same CSS file to multiple pages on their site. This is the method that the majority of websites use.

When CSS is written in an external file, it needs to be linked up with the main HTML. To do this, websites use the following HTML tag:

<link rel="stylesheet" href="style.css">

The rel="stylesheet" attribute indicates that it’s a style sheet that’s being linked to. The href attribute specifies the file name of the style sheet – in this case style.css. Notice that there is no closing tag.

Your Learning Source for initiation in CSS is W3Schools

go to the next link and follow the instructions.

https://www.w3schools.com/css/

w3



General Learning Sources:
Mastering CSS:
References/Docs:
Glossary:
Standards/Specifications:
Architecting CSS:
Authoring/Architecting Conventions:
HTML/CSS Newsletters:

next lesson