Understanding the basics of any code is fundamental to lay the groundwork for a successful career as a software developer.
What are some uses for the <sup>
and <sub>
elements?
The <sup>
element is a superscript element and it can be used to generate, for example, the little numbers of an exponential expression or write the ‘th’ of a date.
The <sub>
element is a subscript element and it can be used to generate, for example, the little numbers of in a chemical equation.
<abbr>
element, what attribute must be added to provide the full expansion of the term?title
is the attribute to accompany <abbr>
when a full expansion of the term is desired.<link>
element that is usually nested in the <head>
element.<style>
element, also nested in the <head>
element, can be used to directly have CSS code within the HTML document at a level that can be applied to the entire document.Why should we avoid using inline styles?
Using inline styling makes it very challenging read your code or modify your code at a later time. Inline styles will increase the size of your HTML document as this type of style has to be applied specifically to the element you want to target. For this reason, if you with to change the style of part of your website later, you will spend wasted time making changes to each individual, styled element.
h2 {
color: black;
padding: 5px;
}
h2
color: black;
padding: 5px;
color
and padding
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 block will execute.
What is the use of an else if
?
I provides another conditional statement with in a parent if
statement for if the first conditional was not true.
&&
and ||
?&&
stands for 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
.1||
stands for 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
.1===