COURSE · 4 chapters · 63 lessons

HTML & CSS

Build what a web page looks like

Read about this chapter

Give text meaning with tags

  1. 01Wrap it in a tagHTML is text with tags wrapped round it. Let us start with the smallest thing you can write.5 slides · 13 exercisesGo to the exercises
  2. 02Add some headingsPut <h1> to <h6> headings together with paragraphs to give your writing a shape.5 slides · 13 exercisesGo to the exercises
  3. 03Join pages with linksUse the <a> tag and the href attribute to make text that takes you to another page.5 slides · 13 exercisesGo to the exercises
  4. 04Put pictures on the pageUse the <img> tag and its src attribute to place a picture. You meet a tag with no closing tag.5 slides · 13 exercisesGo to the exercises
  5. 05Make a bullet listNest the item tag <li> inside the container <ul> or <ol> and build a list.5 slides · 13 exercisesGo to the exercises
  6. 06Your first HTMLMake your first web page with the heading and paragraph tags.5 slides · 8 exercisesGo to the exercises
  7. 07Lists and linksGet comfortable with ul and li for bullet lists, and the a tag that joins pages.6 slides · 8 exercisesGo to the exercises
  8. 08The basics of CSSGive the page colours and sizes — a look of its own — with CSS.5 slides · 11 exercisesGo to the exercises
  9. 09class and divUse the class attribute to style this one element only.5 slides · 11 exercisesGo to the exercises

Change how it looks with CSS

  1. 10Colour your text with CSSSelector, property, value — three parts, and the colour of your text changes.6 slides · 13 exercisesGo to the exercises
  2. 11Size and typefaceUse font-size for size and font-family for typeface, and remake how the same HTML looks.5 slides · 13 exercisesGo to the exercises
  3. 12Treat an element as a boxUse background-color, width and height to change the area of the element itself, not its text.5 slides · 13 exercisesGo to the exercises
  4. 13Name things with classUse the class attribute to name an element, so the same tag can carry different styles.5 slides · 13 exercisesGo to the exercises

The frame of the whole page

  1. 14The frame of an HTML fileLearn what head and body are for, and write the <title> that names your page.6 slides · 13 exercisesGo to the exercises
  2. 15Load a CSS fileUse the <link> tag to call style.css in from your HTML, keeping contents and appearance in separate files.5 slides · 13 exercisesGo to the exercises

Build it part by part

  1. 16Split the page into regionsUse <div> and class to split a page into a top, a middle and a bottom, and lay the ground for a layout.5 slides · 13 exercisesGo to the exercises
  2. 17Build the inside of a headerNest a logo and a menu inside the band across the top of the page.4 slides · 13 exercisesGo to the exercises
  3. 18Put the header side by sideUse float to take elements that were stacked downwards and set them in a row.4 slides · 13 exercisesGo to the exercises
  4. 19Line things up inside the headerMatch the height of a line to the height of the band, so the text sits halfway down.4 slides · 13 exercisesGo to the exercises
  5. 20Build the inside of a footerLine up a name, some links and a copyright line in the band at the foot of the page.4 slides · 13 exercisesGo to the exercises
  6. 21Send the footer left and rightLearn float: right and build a band with the name on the left and the links on the right.4 slides · 13 exercisesGo to the exercises
  7. 22Put the main box in the middleDecide how wide the body of the page is, and set it in the middle.5 slides · 13 exercisesGo to the exercises
  8. 23Line up blocks of the same shapeWrite the items in a listing as blocks built to exactly the same structure.5 slides · 13 exercisesGo to the exercises

Tidy up with borders and spacing

  1. 24Put a border on itGive a thickness, a kind and a colour, and draw a border around a box.4 slides · 13 exercisesGo to the exercises
  2. 25Space inside and space outsideTell padding and margin apart, and give a cramped page some room to breathe.5 slides · 13 exercisesGo to the exercises
  3. 26Lay out the parts of a formBuild up boxes to type in, boxes to choose from, and a button, all inside a form.5 slides · 13 exercisesGo to the exercises
  4. 27Tidy up how the form looksGive labels a line of their own, make the boxes bigger, and finish the button so it is easy to press.4 slides · 13 exercisesGo to the exercises