when you create a web page, you add tags to the contents of it. These tags provide extra meaning to the page and allow browsers to show users the apropriate structure for the page, and we have two different types of tags:
HTML has six levels of headings, <h1> is used for main headings,<h2> is used for subheading, <h3> is smaller and less important and so on.
To create a paragraph, surround the words that make up the paragraph with an opening <p> tag and closing </p> tag. And by enclosing words in the tags ** and ** we can makecharacters appear bold. By enclosing words in the tags ** and ** we can make characters appear italic.
The **** element is used to contain characters that should be superscript such as the suffixes of dates or mathematical concepts like raising a number to a power such as 22.
The **** element is used to contain characters that should be subscript. It is commonly used with foot notes or chemical formulas such as H20.
as you see in the photo below, if you wanted to add a line break inside the middle of a paragraph you can use the line break tag
.
To create a break between themes — such as a change of topic in a book or a new scene in a play — you can add a horizontal rule between sections using the <hr /> tag.
There are some text elements that are not intended to affect the structure of your web pages, but they do add extra information to the pages — they are known as semantic markup.
The <blockquote> element is used for longer quotes that take up an entire paragraph. Note how the <p> element is still used inside the <blockquote> element.
The **** element is used for shorter quotes that sit within a paragraph.
The <address> element has quite a specific use: to contain contact details for the author of the page.
The ins element can be used to show content that has been inserted into a document, while the del element can show text that has been deleted from it.
The s element indicates something that is no longer accurate or relevant (but that should not be deleted).
CSS allows you to create rules that specify how the content of an element should appear.
The element can be used in an HTML document to tell the browser where to find the CSS file used to style the page and it lives insede the head element. It should use three attributes:
You can also include CSS rules within an HTML page by placing them inside a **
multiple line comments: To write a comment that stretches over more than one line, you use a multi-line comment, starting with the /* characters and ending with the * / characters. Anything between these characters is not processed· by the JavaScript interpreter.
single line comments: anything that follows the two forward slash characters I/ on that line will not be processed by the JavaScript interpreter. Singleline comments are often used for short descriptions of what the code is doing.
A script will have to temporarily store the bits of information it needs to do its job. It can store this data in variables. A variable is a good name for this concept because the data stored in a variable can change each time a script runs.
An array is a special type of variable. It doesn’t just store one value; it stores a list of values.
you can evaluate a situation by comparing one value in the script to what you expect it maight be. The result wil be a boolean.
It allowes you compare the results of more than one condition.
the logical and(&&): this operator tests more than one condition. (false && anything = false)
the logical or( || ): this operator tests at least one condition. (true || anything = true)
logical not (!): this operator takes a single operator value and inverts it. ! true = false ! false = true
loops check a condition, if it’s true, a code block will run, then the condition will be checked again and if it’s still true, the code block will run again and again until the condition is false. There are three common types of loops, for, while, and do while:
A for loop is a repetition control structure that allows you to write a loop that needs to run a specific number of times. for example, if you want to execute a loop for 12 time, the code will be like that:
for( i = 0; a < 12; i++ )
you can use it if you don’t know how many times the code should run, the code will continue to loop as long as the condition is true.