COURSE · 4 chapters · 63 lessons
HTML & CSS
Build what a web page looks like
Read about this chapter
Give text meaning with tags
- 01Wrap it in a tagHTML is text with tags wrapped round it. Let us start with the smallest thing you can write.Go to the exercises
- 02Add some headingsPut
<h1>to<h6>headings together with paragraphs to give your writing a shape.Go to the exercises - 03Join pages with linksUse the
<a>tag and the href attribute to make text that takes you to another page.Go to the exercises - 04Put pictures on the pageUse the
<img>tag and its src attribute to place a picture. You meet a tag with no closing tag.Go to the exercises - 05Make a bullet listNest the item tag
<li>inside the container<ul>or<ol>and build a list.Go to the exercises - 07Lists and linksGet comfortable with ul and li for bullet lists, and the a tag that joins pages.Go to the exercises
- 08The basics of CSSGive the page colours and sizes — a look of its own — with CSS.Go to the exercises
Change how it looks with CSS
- 10Colour your text with CSSSelector, property, value — three parts, and the colour of your text changes.Go to the exercises
- 11Size and typefaceUse font-size for size and font-family for typeface, and remake how the same HTML looks.Go to the exercises
- 12Treat an element as a boxUse background-color, width and height to change the area of the element itself, not its text.Go to the exercises
- 13Name things with classUse the class attribute to name an element, so the same tag can carry different styles.Go to the exercises
The frame of the whole page
- 14The frame of an HTML fileLearn what head and body are for, and write the
<title>that names your page.Go to the exercises - 15Load a CSS fileUse the
<link>tag to call style.css in from your HTML, keeping contents and appearance in separate files.Go to the exercises
Build it part by part
- 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.Go to the exercises - 17Build the inside of a headerNest a logo and a menu inside the band across the top of the page.Go to the exercises
- 18Put the header side by sideUse float to take elements that were stacked downwards and set them in a row.Go to the exercises
- 19Line things up inside the headerMatch the height of a line to the height of the band, so the text sits halfway down.Go to the exercises
- 20Build the inside of a footerLine up a name, some links and a copyright line in the band at the foot of the page.Go to the exercises
- 21Send the footer left and rightLearn float: right and build a band with the name on the left and the links on the right.Go to the exercises
- 22Put the main box in the middleDecide how wide the body of the page is, and set it in the middle.Go to the exercises
- 23Line up blocks of the same shapeWrite the items in a listing as blocks built to exactly the same structure.Go to the exercises
Tidy up with borders and spacing
- 24Put a border on itGive a thickness, a kind and a colour, and draw a border around a box.Go to the exercises
- 25Space inside and space outsideTell padding and margin apart, and give a cramped page some room to breathe.Go to the exercises
- 26Lay out the parts of a formBuild up boxes to type in, boxes to choose from, and a button, all inside a form.Go to the exercises
- 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.Go to the exercises