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.
- h1This is a Main Heading
- h2 This is a Level 2 Heading
- h3 This is a Level 3 Heading
- h4 This is a Level 4 Heading
- h5 This is a Level 5 Heading
- h6 This is a Level 6 Heading
- p To create a paragraph, surround the words that make up the paragraph with an opening tag and closing tag.
- b: By enclosing words in the tags and we can make characters appear bold.
- i By enclosing words in the tags we can make characters appear italic.
- em The em element indicates emphasis that subtly changes the meaning of a sentence. By default browsers will show the contents of an em element
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.
- h1, h2, h3 { font-family: Arial; color: yellow;}
- body { font-family: arial; background-color: rgb(185,179,175);} h1 { color: rgb(255,255,255);}
- 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
- responsible for dynamic and interactivr website.
- It is best to keep JavaScript code in its own JavaScript file. JavaScript files are text files (like HTML pages and CSS style sheets), but they have the . j s extension.
- The HTML <script> element is used in HTML pages to tell the browser to load the JavaScript file (rather like the element can be used to load a CSS file).
- If you view the source code of the page in the browser, the JavaScript will not have changed the HTML, because the script works with the model of the web page that the browser has created.
- A script will have to temporarily
store the bits of information it
needs to do its job. It can store this data
[
]
- Functions allow you to group a set of related statements together that represent a single task.
- An object is a series of variables and functions that represent something from the world around you.
