To learn how to build a website using HTML and CSS
- All: To understand HTML and CSS
- Most: To edit HTML and CSS
- Some: To learn about different versions of HTML and CSS
What is HTML and CSS
HTML and CSS are names of languages that let you describe how the contents of a web page appears in a Web Browser.
- HTML lets you specify the type of information
(eg. headers, images, lists, tables, etc)
- CSS lets you style how the information looks.
The HTML/CSS editing window
These lessons use an HTML editing window (shown below, from Trinket), that lets you see the HTML and CSS that creates a web page, and optionally edit them yourself.
For example, the following HTML on the left, produces the boxes on a mini-webpage on the right, together with CSS that you can see by clicking the tab “style.css”.
HTML and CSS editing window
The HTML instructions are what appears between the angled brackets, such as <body>
- Make sure that the tab “index.html” is selected, and see if you can change the numbers in the boxes. Like many editors, if you make a mistake, your can “undo” it by holding down the Ctrl key, and tapping the letter Z (abbreviated to: Ctrl Z).
- Make sure that the tab “style.css” is selected, and see if you can change the colours of the boxes.
- If you’re feeling adventurous, you can edit anything in the two tabs, and see what happens. If you want to reset everything and start again, click the hamburger menu ☰ and select Reset (or you can just refresh the page).
- CSS: the language that lets specify the style of various elements on a web page. CSS is an abbreviation for “Cascading Style Sheets”. The word “cascading” refers to the rules which determine how a Browser prioritises the CSS keywords, which cascade like a waterfall.
- HTML: the language that describes the type of content on a page. HTML is an abbreviation for “HyperText Markup Language”. The word “hypertext” means “link”.
- document: another word for the web page
- source: refers to the HTML and CSS that describes a web page. Sometimes called “source code”.
- tag: an individual HTML keyword, surrounded with angled brackets, eg. <p> which refers to a paragraph of text.
- web page: what you see in your Browser.