HTML, CSS, and JavaScript are the integral working parts of beginning to learn coding and it's very cool to revisit touched on topics and pick up new layers each time.
HTML Advanced Text Formatting.
1.Why is it important to use semantic elements in our HTML?
Semantics give readablity and description to our code, helping us know the function of different elements. The browser also uses semantic values in various ways, for example in search engines or with screen readers.
2.How many levels of headings are there in HTML?
6
3.What are some uses for the <sup>
and <sub>
elements?
<sup>
can be used for exponets in math, or with numbers like 3rd, etc. <sub>
can be used for chemical formulas like H2O.
4.When using the <abbr>
element, what attribute must be added to provide the full expansion of the term?
Add the value attribute of title
for the full expansion of the term.
1.What are ways we can apply CSS to our HTML?
We can apply CSS with external style sheets, internal style sheets, or inline in our HTML.
2.Why should we avoid using inline styles?
Mixing the presentational CSS code with HTML structure and content can complicate things when changes need to be made. It is best practice to keep these separate.
3.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 and padding
h2 {
color: black;
padding: 5px;
}
Continue reading JavaScript Basics. Start at “Comments” and read through “Events” section.
1.What data type is a sequence of text enclosed in single quote marks?
A string
2.List 4 types of JavaScript operators.
Addition (+), Multiplication/Division/Subtraction (-,*,/), Assignment (=), Strictly Equal (===), Not (!), Does Not Equal (!==)
3.Describe a real world Problem you could solve with a Function.
By using a function you could determine sales tax on a given item.
Making Decisions In Your Code – Conditionals.
1.An if statement checks a __ and if it evaluates to ___, then the code block will execute.
If statements check a condition and if it evaluates to true the code will run.
2.What is the use of an else if?
If the condition evaluates to false the else if code will run.
3.List 3 different types of comparison operators.
less than < or greater than > less than or equal <= or greater than or equal >= strictly equal ===
4.What is the difference between the logical operator &&
and ||
?
&&
allows you to chain multiple expressions so that all must evaluate to true for the whole expression to return true.
||
allows you to chain multiple expressions so one or more must evaluate to true for the whole expression to return true.
I want to play with logical operators more as they aren't quite clicking in practicality yet.