Exercise

There will undoubtedly come a time in your future web development career where you will need to make use of this great property, so let’s get you practising using it.

  1. Open your index.html document back up and create a new div at the top of the page.
  2. Give it a width of 600px and a height of 300px.
  3. Fill your div with an introductory paragraph explaining a bit about yourself.
  4. Decide how you want to handle the overflowing text and assign the appropriate value to the div (feel free to experiment with a few of the different values).
  5. Save and preview in the browser.

What we have learned in the CSS section

Well, that was quite a section, right? We just covered the entirety of the fundamentals of CSS. Great job in getting this far. You are well on your way to becoming a fully fledged web designer now. At this point you have mastered enough skills to be able to create your own website using the most fundamental elements of HTML and the most important rules of CSS.

We have seen lists, links, tables, images, divs, headers and even web forms. We have seen how to apply padding, margins, heights, widths, outlines, backgrounds, borders and even understood the mechanics of positioning elements. We really have covered a lot and you have done fantastically well to get this far. Keep up the good work!

We have now built a basic website structure, and explored many different HTML elements and CSS rules, but we have yet to explore interactivity within HTML. Let’s address this in the next section where we can now turn our focus to the most challenging part of the book so far, JavaScript. We’re going to keep it light and just cover the fundamentals to help you to get started on your journey into learning more JavaScript in your own time and at your own pace.