<p></p>
wraps around paragraphs, and <h1></h1>
wraps around headings (there are total of 6 heading elements, no more than 3 should be used on the same page)
Structures and semantic makes a webpage easier to be searched, and easier to be used with screen reader softwares. It also makes stypling with CSS and JavaSript easier
<abbr>
element can be used to wrap around abbreviation or acronym. Note the full expansion of the term in plain text must be included before using the abbreviations<sup>
and <sub>
are superscripts and subscripts. Usecases can include mathematical formulas, scientific notations, and chemical formulas.CSS can be applied to HTML in three ways: 1) external style sheet by linking using <link rel="stylesheet" href="styles.css" />
; 2) internal stylesheet <style>Styles goes here</style>
; 3) Inline styles: <h1 style="color: blue; background-color: yellow: border: 1px solic black;">
, using inline styles is not recommended due to the inefficient maintanance process)
in the following example: the CSS code starts with a selector h2
, with declarations using the curly brackets, and the modified properties are color
and padding
,
h2 { color: black; padding: 5px; }
+
, subtraction -
, multiplication *
, division /
, assignment =
, strict equality ===
, and not !
(and there are more, this is just some examples of commonly used ones)Functions can be used to build modifiable blocks. For instance if a website wants to display a graph, a table, and other properties of a mathematical equation, a function can be used to contain a given mathematical equation. Therefore the equation can be referenced using the function, such that if the equation is changed, all the relevant data can be updated at once.
else if
is used when there’s more than two conditions to be checked===
and !==
test if a value is strictly (or not stricktly identical; <
,>
test if one value is less or greater than another; <=
,>=
test if one value is less than or equal to, or greater than or equal to&&
is a logical AND
, which the expression would only evaluate to true
all conditions must be true; ||
is a logical OR
, which the expression would evaluate to true
if one individual is evalueated to truehttps://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals ↩
https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps/How_CSS_is_structured ↩
https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics ↩
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/conditionals ↩