reading-notes

Readings: Basics of HTML, CSS & JS

Without understnading how a HTML document is structured, it is impossible to know how to modify, add a feature, or do pretty much anything more than just changing text.

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

It is important to use semantic elements in HTML because they give text meaning, and make it accessible to screen readers and search engines.

How many levels of headings are there in HTML?

There are 6 levels of headings available, and you should use no more than three per page. Documents with many levels become messy.

What are some uses for the <sup> and <sub> elements? When using the <abbr> element, what attribute must be added to provide the full expansion of the term?

Superscript <sup> and subscript <sub> are used to mark up items like dates, chemical formulae, and math expressions.

Using the abbr element, <abbr>HTML</abbr> This provides a hint to user agents on how to announce/display the content while informing all users what the abbreviation means.

What are ways we can apply CSS to our HTML?

by using an external stylesheet or doing internal styling.

Why should we avoid using inline styles?

It is less efficient and more messy.

Review the block of code below and answer the following questions: What is representing the selector?

h2

Which components are the CSS declarations?

color and padding

Which components are considered properties?

the values that come after the colon after the declaration

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

a string

List 4 types of JavaScript operators. <

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

Given an artificial increase in the M2 money supply, budget more money for education and decrease the budget for military and defense spending.

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

What is the use of an else if?

to let the code continue running through other options that may return true.

List 3 different types of comparison operators.

|| , &&, >=

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

both statements must return true

Things I want to know more about: