These three languages are commonly used together to build websites.
Why is it important to use semantic elements in our HTML?
Semantic elements are intended for specific, broadly accepted purposes and contain default attributes which can save the developer time. Additionally, they can be recognized by search engines and screen readers and when used properly allow for better search engine optimization and used accessibility.
How many levels of headings are there in HTML?
Six
What are some uses for the <sup> and <sub> elements?
Any place where a superscript or subscript is normally used in text such as mathematical equations, chemical formulas, or potentially the names of somewhat eccentric billionaires’ children.
When using the <abbr> element, what attribute must be added to provide the full expansion of the term?
title
What are ways we can apply CSS to our HTML?
There are three ways: An external style sheet, an internal stylesheet, or an inline attribute.
Why should we avoid using inline styles?
It’s inefficient, difficult to read, and more difficult to update/maintain.
Review this block of code and answer the following questions:
h2 { color: black; padding: 5px; }
What is representing the selector?
h2
Which components are the CSS declarations?
color: blackandpadding: 5px
Which components are considered properties?
colorandpadding
What data type is a sequence of text enclosed in single quote marks?
String
List 4 types of JavaScript operators.
Mathematical, Assignment, Comparison, Logical
Describe a real world Problem you could solve with a Function.
I’ll just make a quick example…
function sleepGoal(desiredHours, actualHours) {
let sleepDeficit = actualHours - desiredHours;
return sleepDeficit
}
An if statement checks a __ and if it evaluates to ___, then the code block will execute.
An if statement checks a condition and if it evaluates to true, then the code will execute.
What is the use of an else if?
The purpose of an else if is to apply another condition to check if the previous one was false with different block of code to execute if true.
List 3 different types of comparison operators.
1. Identical or not identical:
===and!==2. Less than or greater than:<and>3. Less than or equal to OR greater than or equal to:<=and>=
What is the difference between the logical operator && and ||?
Both operators allow for two or more conditions to be checked simultaneously in an if statement. The AND
&&operator will only return true if all conditions are true. The OR||operator will return true if any of the conditions are true.
I’m interested in learning some more JavScript stuff to make our websites more interactive.