View on GitHub

reading-notes

Johnston - Reading Notes - Home

Code 201, Foundations of Software Development

Class 02 - Reading Notes

   

Readings: Basics of HTML, CSS & JS

Introduction to HTML

   

HTML Text Fundamentals

HTML Text Fundamentals

 

HTML Advanced Text Formatting

HTML Advanced Text Formatting

 

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

-   Semantics are relied on everywhere around us—we rely on previous experience to tell us what the function of an everyday object is; when we see something, we know what its function will be. So, for example, we expect a red traffic light to mean "stop," and a green traffic light to mean "go." Things can get tricky very quickly if the wrong semantics are applied.In a similar vein, we need to make sure we are using the correct elements, giving our content the correct meaning, function, or appearance. 

How many levels of headings are there in HTML?

-   There are six heading elements.

What are some uses for the _sup_ and _sub_ elements?

-   You will occasionally need to use superscript and subscript when marking up items like dates, chemical formulae, and mathematical equations so they have the correct meaning.

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

-   When including either, provide a full expansion of the term in plain text on first use, along with the <abbr> to mark up the abbreviation. This provides a hint to user agents on how to announce/display the content while informing all users what the abbreviation means.

   

Learn CSS

Website Design and Process.

   

What are ways we can apply CSS to our HTML?

-   an external stylesheet, with an internal stylesheet, and with inline styles. 

Why should we avoid using inline styles?

-   Inline styles are CSS declarations that affect a single HTML element, contained within a style attribute.  It is the opposite of a best practice. First, it is the least efficient implementation of CSS for maintenance. One styling change might require multiple edits within a single web page. Second, inline CSS also mixes (CSS) presentational code with HTML and content, making everything more difficult to read and understand. Separating code and content makes maintenance easier for all who work on the website.

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

-   What is representing the selector?
  -h2

-   Which components are the CSS declarations?
  -color: black;
   padding: 5px;

 -  Which components are considered properties?
  -color: black; 

   

Learn JS

JavaScript Basics

   

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

-   String 

List 4 types of JavaScript operators.

-   Addition, Assignment, Strict equality, Subtraction   

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

-   Data collection and compiling.

Making Decisions In Your Code – Conditionals

   

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

-   condition, true

What is the use of an else if?

-   if we want more than two choices, or outcomes.

List 3 different types of comparison operators.

-   === and !== — test if one value is identical to, or not identical to, another.

-   < and > — test if one value is less than or greater than another.

-   <= and >= — test if one value is less than or equal to, or greater than or equal to, another.

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

-   && — AND; allows you to chain together two or more expressions so that all of them have to individually evaluate to true for the whole expression to return true.

-   || — OR; allows you to chain together two or more expressions so that one or more of them have to individually evaluate to true for the whole expression to return true.

Bookmark and Review

How to Write a Git Commit Message

   

Things I want to know more about:

   

https://chrisjohnston1986.github.io/reading-notes/201class02reading