Reading notes about code for my future reference.
It is important to use semantics in HTML in order to convey information in a digestable manner to the reader. Semantics can organize and list the textual information and make it easier to read. It can also interact with the web browser and search engines!
There are exactly 6 levels of heading starting with h1-h6. H1 being the biggest and H6 being the smallest!
According to MDN (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup) and (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub)
3 Uses for Sup and Sub are as follows.
4 . When using the element, what attribute must be added to provide the full expansion of the term?
The abbreviation element must be used with a title attribute in order to give it a fully readable context for the users.
You can apply it internally by writing it between style elements directly in the HTML document.
You can apply it inline within specific elements themselves.
You should avoid this kind of styling because its inefficent, causes issues down the road. It really just complicates the entire process.
h2 {
color: black;
padding: 5px; } 1. **What is representing the selector?**
h2 is representing the selector
Color and Padding are the declarations.
black and padding are both considered the properties of the declarations.
The data type is refering to a string regardless of whether a number or text is in there.
The 4 kinds of data type operators are as follows.
Addition = + (combine numbers or strings)
Subtraction = - (Works as in a math)
Assignment = = (Assigns what a variable means or equates to)
Strict Equality = == (Refers to booleans whether a statement equals true or false )
Describe a real world Problem you could solve with a Function.
You could use functions to gather data over a period of time. You wouldn’t have to change the code/ script and have the program just log itself, if you put the appropriate code and then check back on it days later.
An if statement checks an else and if it evaluates to true, then the code block will execute.
What’s the use of an else if statement?
The usage of an else if statement is to give the function an addtional option for closure if none of the other preset answers were given.
=== 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.
source (https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/conditionals)
**What is the difference between the logical operator && and | ?** |
— 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. |
source (https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/conditionals)