Learning Journal
As we explore semantic elements in HTML, it is important to know the value of using them. There were many semantic elements that I did not know existed, but now I was able to replace elements that did not hold any semantic value. An important area of emphasis of all the reading for me was the different type of operators, conditionals, and functions, which feels like the first big step into JavaScript
<h1>
is not used for the heading, in terms of Search Engine Optimization, and Screen Reader softwares. HTML should be coded to represent the data that will be populated and not based on its default presentation styling. For presentation, you should use CSS.<h1>
, <h2>
, <h3>
, <h4>
, <h5>
, and <h6>
. Each element represents a different level of content in the document; <h1>
represents the main heading, <h2>
represents subheadings, <h3>
represents sub-subheadings, and so on.<sup>
and <sub>
elements?
<sup>
can be dates, or mathematical equations. For <sub>
=, it can be used for formulas, and mathematical equations.<abbr>
element, what attribute must be added to provide the full expansion of the term?
<abbr>
to mark up abbreviation<style>
element contained inside the HTML <head>
.color: black;
, and padding: 5px;
are the CSS declarations in the above CSS blockcolor
, and padding
are the properties in the above CSS block''
are strings+
-
*
/
=
===
!
!==
else if
?
if...else
— using else if
. Each extra choice requires an additional block to put in between if () { }
and else { }
===
Identical!==
Not identical<
Less than>
Greater Than&&
and ||
?
&&
— 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.||
— 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.Description lists in HTML
<dl>
; in addition each term is wrapped in a <dt>
(description term) element, and each description is wrapped in a <dd>
(description definition) element.Representing computer code
<code>
: For marking up generic pieces of computer code.<pre>
: For retaining whitespace (generally code blocks) — if you use indentation or excess whitespace inside your text, browsers will ignore it and you will not see it on your rendered page. If you wrap the text in <pre></pre>
tags however, your whitespace will be rendered identically to how you see it in your text editor.
<var>
: For specifically marking up variable names.
<kbd>
: For marking up keyboard (and other types of) input entered into the computer.
<samp>
: For marking up the output of a computer program.<pre>
, then <code>
References