Read: 01 - Introductory HTML and JavaScript
The basics of HTML and JavaScript are the foundation for building webpages. In an analogy, HTML would be a car’s shell when comparing HTML and JavaScript to a vehicle. Likewise, JavaScript would correspond to the engine of a car. It is what makes a website work.
Compose a short poem describing how HTTP sends data between computers.
data was sent from a client, the browser is very relient. it sent back a reply, I could cry. because 404 is not found
Describe how HTML, CSS, and JS files are “parsed” in the browser.
When the browser recieves HTML it will first parse the HTML loading the main content of a webpage. The browser will then check the HTML for a
<link>
element to parse the CSS. At the buttom of the HTML is the<script>
tag which is where the link to the JavaScript is, so it will be parsed last allowing the page to load before running any scripts.
How can you find images to add to a Website?
you can use Google’s license filter to see images that are permitted to be used on your own website. You can purchase a license to use photos, or search for royalty free images on sites such as unsplash.
How do you create a String vs a Number in JavaScript?
You must declare the data inside quotes to assign a variable with the String data type; if the data is declared outside of the quotes, it will be declared as a number data type, as long as the value is equal to a valid number.
What is a Variable and why are they important in JavaScript?
Variables are containers that store values. The containers can be words or letters that represent the data that they store. You can name variables almost anything, except a few exceptions. They are important to JavaScript because they can store primitive data types, functions or expressions. They help keep the code “dry” so you do not need to repeat code throughout a script.
What is an HTML attribute?
An attribute is a part of an element that specifies the element’s behavior, defined inside the opening tag beside the elements name. Example:
<p class="apples">
The class is an attribute of the<p>
element Describe the Anatomy of an HTMl element. Each element begins with can opening tag. Such as<h1>
after the opening tag is where the content is contained, such as text. After the content is the closing tag</h1>
From opening tag, to content, to closing tag makes up an element.
What is the Difference between <article>
and <section>
element tags?
<article>
and<section>
are elements used to make up part of the main element; however, they are different semantically. An<article>
should be able to stand alone, with its content being a block of text. On the other hand, a<section>
can make up a part of an extensive article, such as the first paragraph or a sidebar.
What Elements does a “typical” website include?
<!DOCTYPE> <html> <head> <meta> <title> <body>
How does metadata influence Search Engine Optimization?
How is the <meta>
HTML tag used when specifying metadata?
the
<meta>
is defined inside the content of the<head>
of the document, and attributes are added inside the<meta>
such as<meta name="author">
What is the first step to designing a Website?
define what you want to accomplish with it.
What is the most important question to answer when designing a Website?
What exactly do I want to accomplish?
Why should you use an <h1>
element over a <span>
element to display a top level heading?
Semantically a
<span>
is usually nested inside the content of another element. For example, The<h1>
is semantically used once at the top of a page to display a large heading.
What are the benefits of using semantic tags in our HTML?
Using the correct semantic tags will assist with Search Engine Optimization and screen readers to operate correctly.
Describe 2 things that require JavaScript in the Browser?
Submitting forms, pressing buttons and expecting an action to occur
How can you add JavaScript to an HTML document?
a
<script>
tag can be added to the bottom of the document, and a link to the JS file can be added as an attribute