This reading lesson is important because it details some basic information of HTML, CSS, and JavaScript to provide some background before getting into the technical information.
let variable = '';
and a number by let variable = 4;
(or any other number). A string will be defined using ' '
or " "
around the text.let
, const
, or var
keyword, followed by the name you give to the variable. (https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics)<p>
), the content, and a closing tag (</p>
).<article>
and <section>
element tags?
<article>
encloses a block of related content that makes sense on its own without the rest of the page (e.g., a single blog post), while a <section>
is more for grouping together a single part of the page that constitutes one single piece of functionality (e.g., a mini map, or a set of article headlines and summaries), or a theme. (https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Document_and_website_structure)<!DOCTYPE HTML>
and everything else will be encompassed in the<html>
section. This will include the <head>
section that may include links to the CSS styleSheet or JavaScript script, <meta>
, and <title>
. The content of the site is usually in the <body>
section that is broken up into the <header>
, <main>
, and <footer>
sections.<meta>
HTML tag used when specifying metadata?
<meta>
tag specifies your document’s character encoding. For example, a common charset
attribute is: <meta charset="utf-8"/>
. This tag can also include description and author information. (https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML)<h1>
element over a <span>
element to display a top level heading?
<span>
can render an element to look like a top level heading, but it has no semantic value, so it will not get any extra benefits. It is therefore a good idea to use the right HTML element for the right job. HTML should be coded to represent the data that will be populated and not based on its default presentation styling. Presentation (how it should look), is the sole responsibility of CSS. (https://developer.mozilla.org/en-US/docs/Glossary/Semantics)<script>
elements in the <head>
section.<script>
elements directly in the line desired line of HTML.