reading-notes

Reading 2 - Basics of HTML, CSS, and JS

HTML

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

Semantic elements are important to communicate the function of different elements.

Source

Q2 How many levels of headings are there in HTML?

6, h1 through h6

Source

Q3 What are some uses for the and elements?

Sup is used for superscript - For example exponents in math, the th in 25th,

Sub is for subscript - For example the 2 in H2O

Source

Q4 When using the element, what attribute must be added to provide the full expansion of the term?

The “title” element must be added to provide the full expansion of the term.

Source

CSS

Q5 What are ways we can apply CSS to our HTML?

CSS can be applied to HTML by

  1. An external style sheet (preferred)

  2. An internal style sheet

  3. Inline styles

Source

Q6 Why should we avoid using inline styles?

Inline styles should be avoided because it is more difficult to read and understand, and because it is more difficult to update because any changes will need to be made in multiple locations within the document.

Source

Q7 Review the block of code below and answer the following questions:

h2 { color: black; padding: 5px; }

A - What is representing the selector?

h2

Source

B - Which components are the CSS declarations?

A CSS declaration is a property with a value. So, color : black; is a declaration, as is “padding : 5 px;”.

Source

C -Which components are considered properties?

The property is the identifier within the declaration. So, color and padding are both properties.

Source

JS

Q8 What data type is a sequence of text enclosed in single quote marks?

A string

Source

Q9 List 4 types of JavaScript operators.

Source

Q10 Describe a real world Problem you could solve with a Function.

An example of a real world problem that can be solved with a function is to multiply any 2 given numbers.

Source

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

An if statement checks a conditional, and if it evaluates to true, then the code block will execute.

Source

Q12 What is the use of an else if?

An “else if” is used if you want to combine more than two conditions.

Source

Q13 List 3 different types of comparison operators.

Source

Q14 What is the difference between the logical operator && and ||?

Source

Things I want to know more about