Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 3.43 KB

class2.md

File metadata and controls

75 lines (53 loc) · 3.43 KB

Class 2 Reading Assignment

Intro to HTML

  1. why is it important to use semantic elements on our HTML
    • So that we know how something will function based on past experiences. Semantics add consistancy to our code.
  2. what are some uses for the and elements?
    • The is used inorder to raise the 'TH' in the phrase "25th". where would be used in the case of a chemical fourmula allowing the numbers to show below the letters for example "C8 H10 N4 O2"
  3. how many levels of headings are there in HTML?
    • 6
  4. when using the element. what attribute must be added to provide the full expansion of the term?
    • "title"

Learn CSS

  1. what are ways we can apply CSS to our HTML
    • External Style Sheet, Internal Style Sheet, and with inline styles.
  2. why should we avoid using inline styles?
    • it is not efficient and it clogs up the HTML page and makes things hard to read
  3. answer the three questions
    • What is representing the selector * H2
    • which components are the CSS declarations * color: black; padding: 5px;
    • Which components are considered properties * color, padding

Learn JS

  1. What data type is a sequence of text enclosed in a single quote marks
    • a string
  2. list 5 types of java script operators
    • Addition
    • Subtraction, Multiplication, Division
    • Assignment
    • Strict equality
    • Not, Does-not-equal
  3. Describe a real world problem you could solve with a function.
    • everytime an item is added to a shopping cart a button is clicked. having portions of that code written as a function would be useful to prevent rewriting of the same code.

Making Decisions in your code - conditionals.

  1. An if statment checks a specified condition and if it evaluates to true. then the code will execute
  2. what is the use of an else if?
    • it extends an if statement to execute a different statement in case the original if expression evaluates to false .
  3. list the three different types of comparison operators.
    • === strict equality, == equal, !== strict not equal
  4. what is the difference between the logical operator && and ||?
    • && statement both conditions need to be true in order for the code to run where || only one condition needs to be true in order for the code to run.

Cheat Sheet

is used when info from elsewhere needs to be quoted. with URL can be included within this element. Any code within
will look like an indented paragraph.

Inline quotes use with URL and are intended for short quotes.

is used for abbreviations or acronyms and are wrapped around them. This is commonly used when the full explanation of the abbreviated term is used and then is used throughout the rest of the markup.

is used for providing contact info for the document. It is best used in te footer to provide the contact info for the site or in a article for the contact info of the author.

and are superscript and sub script respectively and are used for dates, chemical formulas, and math equations.

is used for time and date formats for machines to read

marks up generic pieces of computer code

 retains white space, typically around code blocks. Any white spaced used within tag will show

 marks up variable names

 marks up keyboard input

 marks up the computer programs output