Text in html
When creating a web page, you add tags(known as markup) to the contents of thepage. These tags provide extra meaningand allow browsers to show users the appropriate structure for the page.
-
Headings <1> <2> <3>
- Paragraphs <p>
- Bold & It alic __
- Superscript & Subscript __ __
- Strong & Emph asis __
- Quotations <blockquote>
HTML elements are used to describe the structure of the page (e.g. headings, subheadings, paragraphs). XX They also provide semantic information (e.g. where emphasis should be placed, the definition of any acronyms used, when given text is a quotation).
Introducing CSS
CSS allows you to create rules that specify how the content ofan element should appear. For example, you can specify thatthe background of the page is cream, all paragraphs shouldappear in gray using the Arial typeface, or that all level oneheadings should be in a blue, italic, Times typeface. CSS works by associating rules with HTML elements. These rules govern how the content of specified elements should be displayed. A CSS rule contains two parts: a selector and a declaration.
CSS treats each HTML e XX lement as if it appears inside its own box and uses rules to indicate how that element should look.
- Rules are made up of selectors (that specify the elements the rule applies to) and declarations (that indicate what these elements should look like).
- Different types of selectors allow you to target your rules at different elements.
- Declarations are made up of two parts: the properties of the element that you want to change, and the values of those properties. For example, the font-family property sets the choice of font, and the value arial specifies Arial as the preferred typeface.
- CSS rules usually appear in a separate document, although they may appear within an HTML page.
Basic JavaScript Instructions
- A script is made up of a series of statements. Each statement is like a step in a recipe.
- Scripts contain very precise instructions. For example, you might specify that a value must be remembered before creating a calculation using that value.
- Variables are used to temporarily store pieces of information used in the script.
- Arrays are special types of variables that store more than one piece of related information.
- JavaScript distinguishes between numbers (0-9), strings (text), and Boolean values (true or false).
- Expressions evaluate into a single value.
- Expressions rely on operators to calculate a value.
Decisions and Loops
Looking at a flowchart (for all but the most basic scripts), the code can take more than one path, which means the browser runs different code in different situations. In this chapter, you will learn how to create and control the flow of data in your scripts to handle different situations. EVALUATIONS You can analyze values in your scripts to determine whether or note they match expected results. 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.