Html

https://odai1990.github.io/reading-notes/

Html

Headings

HTML has six “levels” of headings:


<h1> is used for main headings. <h2> is used for subheadings.

img


Paragraphs

<p>ali</p>

Bold & It alic

<i> –> ali

<b> –> ali

Superscript & Subscript

<sub> –> H2O

<sup> –> H2

Line Breaks & Horizontal Rules

<br/> to add new line

<hr/> to add horizontal rule

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 — they are known as semantic markup. ex <em> <blokquet>

Strong & Emphasis

<strong>: The use of the <strong> element indicates that its content has strong importance. <em> The <em> element indicates emphasis that subtly changes the meaning of a sentence.

Quotations

<blockquote> 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.

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

Abbreviations &Acronyms

<abbr> html HTML If you use an abbreviation or an acronym, then the <abbr> element can be used.

Citations & Definitions

<cite> When you are referencing a piece of work such as a book, film or research paper, the <cite> element can be used to indicate where the citation is from.

<dfn> The first time you explain some new terminology (perhaps an academic concept or some jargon) in a document, it is known as the defining instance of it.

Auth or Details

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

Changes to Content

<ins> <del> 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.

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

CSS


img


CSS allows you to create rules that specify how the content of an element should appear.

We have rules to write valid CSS

img



CSS declarations sit inside curly brackets and each is made up of two parts: a property and a value, separated by a colon.
img
1. Properties indicate the aspects of the element you want to change.
2. Values specify the settings you want to use for the chosen properties.


Adding CSS to Html

#### We have three ways to add css:


## CSS Selectors


img


## CSS priority

  1. inline
  2. important
  3. id
  4. class
  5. Sequence of declaration.


Css is inhretence

JAVASCRIPT




img

Javascript is a programing language that you can use it to make webpage more dynamic and interactive, also you can use it to manipulates and adjust css and html tags.

Examples :

Before starting write code please take those steps:

  1. DEFINE THE GOAL: First, you need to define the task you want to achieve.
  2. ESIGN THE SCRIPT: To design a script you split the goal out into a series of tasks.
  3. CODE EACH STEP: Each of the steps needs to be written in a programming language that the compu ter understands.
  4. Use flowcharts: Arrows show how the script moves from one task to the next. The different shapes represent diff€rent types of tasks.

img


img


RULES FOR NAMING VARIABLES

We have rules to name varibales:

Array

to declering javascript you can just use one of tow way

var x=[]

var x= new Array()

img

EXPRESSIONS


var x= 55;


OPERATORS


var x= 5>5; var x= 5==5; var x= (5 > 3) && (2 < 4); var x= “odai” + 23


Logical operators


img


for NOT operator (!) is just reverse the value

Examples


( (2 > 3) && ( 5<6 ) ) -> False

( (2 > 3)   ( 5<6 ) ) -> True

!(4 < 5) -> False

LOOPS


Loop is a chunk of code that allows you to repeat printing or calculate or whatever you want, depend on condition as long as true


We have three types of loops:


  while(condition)
 {

     check condition
 }
  do
 {

     check condition
 }while(condition)