Workshop: Introduction to CSS
Whilst logged into GitHub with your Birkbeck email address, get the starter repository from the link in moodle. Clone it using Visual Studio Code following the instructions in the prep video How to clone a GitHub repository with VS Code.
Styling text:
- In the HTML template page (index.html), create a top heading and 3 paragraphs of text using one of the lorum ipsum alternative sites on this page: https://www.justinmind.com/blog/awesome-lorem-ipsum-alternatives/.
- Create an external stylesheet for your CSS rules.
- Change the width of the main element so it is less than 100% (but over 50%). Centre it horizontally using margin.
- Using an appropriate element selector, style the top heading using your choice of font from https://fonts.google.com/.
- Using an appropriate element selector, style the paragraphs in a web safe font of your choice (https://www.cssfontstack.com/).
- Choose a colour of your choice for the top heading, and another colour for the paragraphs, adding these colours in hexadecimal form to the appropriate element selectors.
- Add one link to a selection of text (a word, or a few words) in each paragraph, and use a class to change the colour of all the links. Make the links a different colour when you hover over them.
- Make a selection of text (a word, or a few words) in each paragraph bold and or italic, changing its colour and/or underlining it. Style each text selection in a unique way using a different id each time as the selector for your style declarations.
Styling boxes and adding backgrounds:
- Underneath your three paragraphs, create three divs of the same or different widths.
- Add a list with 5 items into each div, making two lists unordered and one ordered, and changing each list-style-type to something else of your choosing (https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type).
- Change the display of each div to be either block or inline-block according to preference, adjusting widths as needed to create the layout you want.
- Add a background colour to each box (all different, one different, or all the same colour), making sure the list text inside it contrasts the background enough to be read easily.
- Add colour to either the border and/or the margin to outline the div boxes in the style you want.
- Add a background image to the body of the page (https://www.pexels.com/search/background/). Style it using background-repeat, background-position and/or background-size.
Styling tables (optional):
- Change the styles of the animalsHumans.html file according to taste.
- Alternatively create your own table with interesting information, and style that page and table as you wish.