# Read: Class 02 - Readings: Basics of HTML, CSS & JS

## Answers

## HTML

1. Why is it important to use semantic elements in our HTML?

   - It is important as they provide whoever is reviewing the code immediate understanding,
     in that they can see where the header or footer is straight away. It also provides values to the elements
     (such as making important headings bigger and stand out more, and helps with things like search engines and screen readers.

2. How many levels of headings are there in HTML?

   - There are six levels are headings, h1 being the first and most important. They then descent in order - h2, h3, h4, h5, and h6.
  
3. What are some uses for the < sup > and < sub > elements?

   - They are for Superscript and Subscript on text. They can be used on dates (the small st, nd, rd, and th) and in formulae (when writing to the power).
  
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 stylesheet, internal stylesheet, and inline styling.
  
2. Why should we avoid using inline styles?

   - Because it can get muddled in with the HTML, being hard to distinguishe and making maintenance hard. It can also be a pain when needing to make changes,
     as the changes may need to be made in multiple places.

3. Review the block of code below and answer the following questions:
   - What is representing the selector? - A. h2
   - Which components are the CSS declarations? - A. color: black; *and* padding: 5px;
   - Which components are considered properties? - A. color *and* padding
  > h2 {
  >   color: black;
  >  padding: 5px;
  > }

## Learn JS

1. An if statement checks a __ and if it evaluates to ___, then the code block will execute.

   - *condition* and *true*
  
2. What is the use of an else if?

   - Else if can be used when we have more than two choices.
  
3. List 3 different types of comparison operators.

   - ==	equal to
   - ===	equal value and equal type
   - !=	not equal

4. What is the difference between the logical operator && and ||?

   - && = and
   - || = or
