reading-notes

Class 2 - HTML, CSS, & JavaScript Review

The reading today was important because it covered some HTML elements I haven’t used before, it broke down the anatomy of CSS and its structure, and covered conditional statements and comparison operators in JavaScript. All of these items will be critical to understand moving forward.

Introduction to HTML

  1. Why is it important to use semantic elements in our HTML?
    • To give meaning to our code so any developer can understand the purpose of each element.
  2. How many levels of headings are there in HTML?
    • 6
  3. What are some uses for the <sup> and <sub> elements?
    • To create superscript and subscript for dates, math equations, etc.
  4. When using the <abbr> 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 stylesheets, internal stylesheets, and inline styles
  2. Why should we avoid using inline styles?
    • It’s the least efficient method because it makes the HTML portion of the code very long, hard to read, and may cause problems because it is the most specific and will override less specific CSS code for similar elements.
  3. Review the block of code below and answer the following questions:
    h2 {
      color: black;
      padding: 5px;
    }
    

Learn JS

  1. What data type is a sequence of text enclosed in single quote marks?
    • A string
  2. List 4 types of JavaScript operators.
    • Addition: +
    • Assignment: =
    • Strict Equality: ===
    • Division: /
  3. Describe a real world Problem you could solve with a Function.
    • A function that takes a string of numbers and converts them into binary.

Conditionals

  1. An if statement checks a __ and if it evaluates to ___, then the code block will execute.
    • condition & true
  2. What is the use of an else if?
    • Allows to check for additional conditions to allow for additional outcomes.
  3. List 3 different types of comparison operators.
    • Strict Equality: ===
    • Less Than: <
    • Greater Than or Equal To: >=
  4. What is the difference between the logical operator && and ||?
    • && is the conditional “and” and || is the conditional “or” statement to evaluate multiple sets of conditions.

Things I want to know more about