Readings: Basics of HTML, CSS & JS

Structure and emphasis through HTML elements

When creating a web page you can use different html elements to help guide reader to important information. With html elements you are able to add more information if needed to better describe a section of text.

html element examples

  1. <abbr>
    • allows you to use an abbreviation but also give full word when hovering over text
  2. <cite>
    • Helps the reader realize that a title or a paper or book has been cited
  3. <ins>, <del>
    • allows you to show the reader when something as been removed from the text and a new word has been added

CSS

You are able to connect css styles using internal or external files

Parts of css code

  1. selector
    • tells the style sheet what html element to style
  2. declaration
    • tells the css how to style the selected element
  3. property
    • tells css what exactly we are changing about the element
  4. value
    • finally the value tells the css exactly what to change the property to

Basic javascript

Variables are made up of

  1. var
    • shows that you are about to create a variable
  2. variable name
    • give the variable you are making a name (case sensitive)
  3. value
    • give the variable a value to hold

Data Types

Numeric, String, Boolean

Rules for naming variable

  1. must start with a letter, ($), or (_)

  2. the name CAN contain letters, numbers, ($), (_)
    • no (-), or (.)
  3. can not use keywords or reserved words

  4. variables are case sensitive

  5. use names that best describe the information in variable

  6. if you are using more than one word in a variable have the first word start with a lower case letter and then every word after that start with an uppercase letter

Decision making

The two components to decision making

  1. Evaluate and expression then return if that is true or false

  2. the conditional statements says what to do when a given situation is met

Evaluation conditions

When evaluating conditions you use comparison operators

== is equal to

!= is not equal to

=== strict equal to

!== strict not equal to

greater than

< less than

= greater than or equal to

<= less than or equal to

Logical operators

&& tests more than one condition

  this operator test at least on condition

! inverts a single boolean