Skip to content

Latest commit

 

History

History
76 lines (56 loc) · 3.38 KB

File metadata and controls

76 lines (56 loc) · 3.38 KB

THE DOCUMENT OBJECT REPRESENTS AN HTML PAGE

Using the document object, you can access and change what content users see on the page and respond to how hey interact with it.

the document object has:

  • PROPERTIES Properties describe characteristics of the current web page. image1
  • METHODS Methods perform tasks associated with the document currently loaded in the browser
  • EVENTS You can respond to events, such as a user clicking or tapping on an element.

In fact, the document object is just one of a set of objects that all major browsers support. When the browser creates a model of a web page, it not only creates a document object, but it also creates a new object for each element on the page.

HOW A BROWSER SEES A WEB PAGE

how a browser interprets the HTML code and applies tyling to it 1- RECEIVE A PAGE AS HTML CODE 2-: CREATE A MODEL OF THE PAGE AND STORE IT IN MEMORY 3-USE A RENDERING ENGINE TO SHOW THE PAGE ON SCREEN

All major browsers use a JavaScript interpreter to translate your instructions (in JavaScript) into instructions the computer can follow.

image5

HOW HTML, CSS, & JAVASCRIPT FIT TOGETHER

language

HTML

html files This is where the content of the page lives.The HTML gives the page structure and adds semantics.

CSS

css files The CSS enhances the HTML page with rules that state how the HTML content is presented (backgrounds, borders, box dimensions, colors, fonts, etc.).

JavaScript

This is where we can change how the page behaves, adding interactivity. We will aim to keep as much of our JavaScript as possible in separate files

It is best to keep JavaScript code in its own JavaScript file. img

Javascript

  • STATEMENTS

JavaScript is case sensitive so timeNow means something different to TimeNow or TIMENOW.

now if we would to talk about if statement it give a condition if it done it well do the statement if not it will out of the statement

jimage

  • COMMENTS we can use // to write something we would not to share in user screen.

Are you know WHAT IS A VARIABLE?

Variables help us to save specific data and numbers to facilitate their use and make it easier for us to perform mathematical operations and enter data in them. Let's say, for example, that it is a storeg in which what is called is when we need it. var img

RULES FOR NAMING VARIABLES

  • The name must begin with a letter, dollar sign ($),or an underscore (_). It must not start with a number.
  • All variables are case sensitive. *The name can contain letters, numbers,But note that you must not use a dash(-) or a period (.) in a variable name.
  • Use a name that describes the kind of information that the variable stores.
  • You cannot use keywords or reserved words. Keywords are special words that tell the interpreter to do something.
  • If your variable name is made up of more than one word, use a capital letter for the first letter of every word after the first word.

contact us

Aya's GitHub