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
<abbr>- allows you to use an abbreviation but also give full word when hovering over text
<cite>- Helps the reader realize that a title or a paper or book has been cited
<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
- selector
- tells the style sheet what html element to style
- declaration
- tells the css how to style the selected element
- property
- tells css what exactly we are changing about the element
- value
- finally the value tells the css exactly what to change the property to
Basic javascript
Variables are made up of
- var
- shows that you are about to create a variable
- variable name
- give the variable you are making a name (case sensitive)
- value
- give the variable a value to hold
Data Types
Numeric, String, Boolean
Rules for naming variable
-
must start with a letter, ($), or (_)
- the name CAN contain letters, numbers, ($), (_)
- no (-), or (.)
-
can not use keywords or reserved words
-
variables are case sensitive
-
use names that best describe the information in variable
- 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
-
Evaluate and expression then return if that is true or false
-
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
- allows you to compare the results of two or more comparison operators
&& tests more than one condition
| this operator test at least on condition |
! inverts a single boolean