Introduction
Welcome to the world of CSS. I am so glad and honoured that you picked up this book. Before we embark on this learning journey together, let us first define what is CSS.
CSS stands for Cascading Stylesheet and is used for the styling and design of a website. It is one of the many languages a web programmer uses to create a website. Other web languages include HTML, Javascript and PHP, just to name a few.
HTML is concerned with the content and structure of a website. As a website’s existence is meaningless without content, knowing HTML is essential for anyone interested in web programming. This book will first start with an introduction to HTML, covering some of the essential basics you need to know about HTML. While this coverage is by no means comprehensive, it should be enough for you to perform most of the HTML tasks necessary. If you are familiar with HTML, feel free to skip to Chapter 3.
Tools of the Trade
Before we start coding our HTML and CSS pages, let us first look at some of the recommended tools for doing web programming.
At the most basic level, you only need a web browser (e.g. Internet Explorer, Chrome, Safari, Firefox) and a text editor (e.g. Notepad) to start coding websites. However, unless you belong to the school of thought that real programmers shouldn’t use any programming aid, I strongly encourage you to use some of the free tools available online to make your coding life easier.
One of the most recommended tool is an advanced text editor that offers syntax highlighting. Syntax highlighting means the editor will display text in different colors depending on the purpose of the text. For instance, the editor may use red color for keywords, blue for comments and green for variables. This simple feature will make your code much easier to read and debug. If you are on a Windows machine, I suggest Notepad++ (http://notepad-plus-plus.org/). For Mac, I suggest TextWrangler (http://www.barebones.com/products/textwrangler/). Both are free to use.
Opening a .HTML File
An .HTML file can be opened in two ways. One way is to open it in a web browser by double clicking on the file. This is for viewing the page. Another way is to open it in a text-editor for editing. To do that, first launch your text-editor and then open the file from within the editor.
When working with HTML files, I suggest you open the file in your browser and text-editor concurrently and arrange the two windows so that they are side-by-side. That way, you can edit the code on your editor, save it, and then move over to your browser, refresh the page and immediately check the effects of the changes you made to the code. Follow this procedure when working on the exercises from Chapters 3 to 10.