View on GitHub

reading-notes

Text

When creating a web page, you add tags to the contents of the page. These tags provide extra meaning and allow browsers to show users the appropriate structure for the page.

Heading

HTML has six “levels” of headings , The contents of an <h1 element is the largest, and the contents of an <h6 element is the smallest.

Heading

Paragraph

To create a paragraph, surround the words that make up the paragraph with an opening <p tag and closing </p tag.

Bold & Italic

By enclosing words in the tags <b and </b we can make characters appear bold.

Bold

By enclosing words in the tags <i and </i we can make characters appear italic.

Italic

Superscript & Subscript

subp

White Space

When the browser comes across two or more spaces next to each other, it only displays one space. Similarly if it comes across a line break, it treats that as a single space too. This is known as **white space collapsing**.

space

Line Break

if you wanted to add a line break inside the middle of a paragraph you can use the line break tag <br.

breakline

Horizantal Rule

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.

Horizantal

Semantic markup

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.

Strong tag

The use of the <strong element indicates that its content has **strong importance.**

strong

emphasis tag

The <em element indicates emphasis that subtly changes the meaning of a sentence.

emphasis

Blockquote tag

The <blockquote element is used for longer quotes that take up an entire paragraph.

The <q element is used for shorter quotes that sit within a paragraph.

quote

The <abbr tag defines an abbreviation or an acronym, Use the global title attribute to show the description for the abbreviation oracronym when you mouse over the element.

Citations tag

The <cite tag defines the title of a creative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture),The text in the <cite element usually renders in **italic**.

cite

Defintion tag

The <dfn tag stands for the “definition element”, and it specifies a term that is going to be defined within the content.

definition

Address tag

The <address element has quite a specific use: to contain contact details for the author of the page.

address

ins and del tag

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.

ins

S tag

The <s element indicates something that is no longer accurate or relevant (but that should not be deleted).

s


CSS

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

CSS declarations sit inside curly brackets and each is made up of two parts: a property and a value, separated by a colon. You can specify several properties in one declaration, each separated by a semi-colon.

cs

Using External CSS

link

Selectors

selector n


Basic JavaScript Instructions

Statements : A script is a series of instructions that a computer can follow one-by-one. Statements should end with a semicolon(;).

COMMENTS

can be used to explain JavaScript code, and to make it more readable,can also be used to prevent execution, when testing alternative code.

## WHAT IS A VARIABLE?

JavaScript variables are containers for storing data values.

declartion var

How to assign value to var:

signvar

## DATA TYPES

JavaScript distinguishes between Numbers, Strings, and Booleans.

SHORTHAND FOR CREATING VARIABLES

short

RULES FOR NAMING VARIABLES

Arrays

An array is a special type of variable. It doesn’t just store one value; it stores a list of values.

Creating an Array

arrays

CHANGING VALUES IN AN ARRAY

change

EXPRESSIONS

An expression evaluates into (results in) a single value.

OPERATORS

Expressions rely on things called operators; they allow programmers to create a single value from one or more values.

JavaScript Arithmetic

arthematic

MIXING NUMBERS AND STRINGS TOGETHER

m1

m2

m3


Comparison Operators

Comparison operators are used in logical statements to determine equality or difference between variables or values.

comp compa

Logical Operators

Logical operators are used to determine the logic between variables or values.

logical

Conditional Statements

Use if to specify a block of code to be executed, if a specified condition is true.

syntax

ifstatemnet

Use the else statement to specify a block of code to be executed if the condition is false.

ifelse

Use the else if statement to specify a new condition if the first condition is false.

elseif