When creating a web page, you add tags known as markup to the contents of the page. These tags provide extra meaning and allow browsers to show users the appropriate structure for the page. In this chapter we focus on how to add markup to the text that appears on your pages. You will learn about:
- Structural markup: the elements that you can use to describe both headings and paragraphs, examples:
-heading < h > -paragraph < p > -break < br/ > , < hr/ >
CSS allows you to create rules that specify how the content of an element should appear. For example, you can specify that the background of the page is cream, all paragraphs should appear in gray using the Arial typeface, or that all level one headings should be in a blue, italic, Times typeface. Once you have learned how to write a CSS rule, learning CSS mostly involves learning the different properties you can use. So this chapter will:
- Introduce you to how CSS works
- Teach you how to write CSS rules
- Show you how CSS rules apply to HTML pages The remaining chapters in this section will look at all of the various CSS properties you can use.
STATEMENTS A script is a series of instructions that a computer can follow one-by-one. Each individual instruction or step is known as a statement. Statements should end with a semicolon.
Scripts often need to behave differently depending upon how the user interacts with the web page and/or the browser window itself. To determine which path to take, programmers often rely upon the following three concepts:
- EVALUATIONS You can analyze values in your scripts to determine whether or note they match expected results. 9 DECISIONS & LOOPS
- DECISIONS Using the results of evaluations, you can decide which path your script should go down.
- LOOPS There are also many occasions where you will want to perform the same set of steps repeatedly.