Web Design and Authoring: Session three
Session three summary
We've packed a lot into session three! CSS is a large topic, but I hope this introduction to the basics has made you want to know more. We'll keep adding to our CSS knowledge as the course progresses.
At the end of Session three you should know that:
- CSS is a presentation language which we use with HTML to add visual presentation to our web pages, adding visual styling including different fonts, colour and background colour
- CSS helps to make our pages accessible to all (including screen-reading software and search engine robots) by separating presentation from the semantic meaning of our HTML
- CSS is written differently from HTML, with a strict syntax (way of writing the elements)
- selectors apply the style rules to the selected areas of the document
- tag, class, id and compound are all types of selector
- style rules are composed of a selector and a declaration block made up of one or more style declarations, each declaration is a property:value pair, separated by a semi-colon (;)
- the most effective way to apply styles is using external stylesheets
- we can use CSS for page layout, using the <div> tag
You will have set up an external style sheet of your own, attached it to your existing pages with the <link> tag, and experimented with several style properties and values.
Quite an achievement!
Self-study tasks
It is always a good idea to practise new skills: to reinforce what you've already learnt, and give you confidence to tackle the next new topic.
Here are my suggestions:
- spend some time looking at the websites referred to in the How to write CSS styles page, to find out more about font types, colours and CSS properties (we'll be adding more properties next session)
- try changing colours and background colours to find combinations that you like
- try setting up more style rules for classes and ids to add to your pages (you can add them all to the same stylesheet, or you can make a new stylesheet and some new pages for your own experiments)
If you wish to print out this session's web pages, download the .pdf version of session three here.
Next session
We'll create a page layout using CSS.