HTML has six “levels” of headings:
paragraphs
To create a paragraph, surround the words that make up the paragraph with an opening <p> tag and closing </p> tag.
Bold, italic, emphasis
Structural and semantic markup
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.
How does CSS actually work?
When a browser displays a document, it must combine the document’s content with its style information. It processes the document in a number of stages, which we’ve listed below. Bear in mind that this is a very simplified version of what happens when a browser loads a webpage, and that different browsers will handle the process in different ways.
Rules, properties, and values
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.
You should write comments to explain what your code does. They help make your code easier to read and understand. This can help you and others who read your code.
A script will have to temporarily store the bits of information it needs to do its job. It can store this data in variables.
USING A VARIABLE TO STORE A NUMBER
Note that the numbers are not written inside quotation marks.
price = 5;
quantity = 14;
USING A VARIABLE TO STORE A NUMBER STRING
Note how the string is placed inside quote marks.
username = ‘Molly’;
message = ‘See our upcoming range’;
USING A VARIABLE TO STORE A BOOLEAN
A Boolean variable can only have a value of true or fa 1 se, but this data type is very helpful.
inStock = true;
shipping= false;
RULES FOR NAMING VARIABLES
Values in an array are accessed as if they are in a numbered list. It is important to know that the numbering of this list starts at zero (not one)
Expressions rely on things called operators; they allow programmers to create a single value from one or more values.
-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.
USING COMPARISON OPERATORS
var comparison= (score!+ score2) > (highScorel + highScore2);
var passBoth = (scorel >= passl) && (score2 >= pass2);
USING LOGICAL OR & LOGICAL NOT
var minPass = ((scorel >= passl) | (score2 >= pass2)); |
var msg = ‘Resit required: ‘ + !(minPass);
USING IF STATEMENTS
var score 75; \\ Score
var msg; \\Message
if (score>= 50) { \\ If score is 50 or higher
msg = ‘Congratulations!’;
msg += ‘ Proceed to the next round . ‘ ;
var el = document.getElementByld(‘answer ‘ ) ;
el .textContent = msg;