It is crucial to understand the fundamentals of what you are working on. It is important get comfortable with the topics in the readings as these will lay the base for everything we learn in this course.
Describe how HTML, CSS, and JS files are “parsed” in the browser.
HTML is read first. It will start from top and go line by line. As it encounters external links and references, the browser will fetch those additional files. The browser will, unless told otherwise, will save the the CSS construct, and JavaScript will compile and execute.
How can you find images to add to a Website?
When looking for images to add to your website, make sure you are not infringing upon any copyrights. Use the Creative Common license in google to reduce your chance of any violation. Still, it is your responsibility to make sure your not violating any laws.
How do you create a String vs a Number in JavaScript?
String can be made by enclosing text in single or double quotations.
Numbers are kept as a number data type when they’re not encapsulated by quotations.
What is a Variable and why are they important in JavaScript?
Variables are a form of code that holds data. Variables in JavaScript can be dynamic and created by let
, or constant and unchangeable by making the variable with const
.
Compose a short poem describing how HTTP sends data between computers.
From client to server, data flows
Through HTTP’s network hose
Requests sent and responses received
Information exchanged, connections achieved
A language of the web, HTTP speaks
Sending data across digital creeks
In packets, bits, and bytes it travels
As if on wings, it nimbly unravels
With URLs as its guiding star
HTTP takes data oh so far
From one computer to another it goes
Like a message in a bottle, it flows
So next time you surf the web
Think of HTTP and its threaded web
Sending data here and there
Making the internet a world to share.
This poem was created by ChatGPT Feb 13 Version by feeding it the prompt “Compose a short poem describing how HTTP sends data between computers”.
I do not have verbal creativity and spent more time than necessary trying to make the just two lines of poem. So to answer the question in my own, non-poetic words:
When you load a website in your browser, your browser requests the website code from the servers. The servers parses portions of the HTML and sends it to your browser to read. As your browser reads it and requires additional information, additional requests are sent and information is received. Your browser continues to download these chunks of data until the full website is generated.
What is an HTML attribute?
An HTML attribute is a piece of code that adds additional information to an HTML element, changing how the element behaves.
Describe the Anatomy of an HTMl element.
HTML element is composed of an opening and closing tag which surround the content of the element. An attribute, if required, is added to the opening tag.
Not all elements will have a closing tag, such as <img>
What is the Difference between <article>
and <section>
element tags?
An article element should house content and/or other elemets that, when seemed as a unit, can stand on its own. A section element tag should be used to group like items together. Sections can be conmposed of theveral other articles and vice versa.
What Elements does a “typical” website include?
<main>
, <body>
, <article>
, <section>
, <aside>
, <header>
, <nav>
, and <footer>
How does metadata influence Search Engine Optimization?
Meta data is usually placed within the head element. With the following meta script, the content can be searched by search engines.
<meta name="description" content="My website is about...." />
Meaningful and descriptive content will increase likelihood your website is found when searched.
How is the <meta>
HTML tag used when specifying metadata?
The <meta>
HTML tag can be given a verity of attributes which will change its purpose. A few purposes of this tag can be 1. giving the website specifics on additional scripts (such as CSS and JS scripts), 2. provide the character that will code the website, 3. house the author and description information of the website, and 4. adding paths for proprietary creations made specific for a website.
What is the first step to designing a Website?
The first step of designing a website is to have a vision of what you want to accomplish. You might know all of the technicalities on how to write the code, if you do not have vision of what you are trying to achieve, you will not create anything useful.
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?
While multiple elements can be used interchangeably and achieve the same visual result in the page, using elements for their intended purpose will make your code more readable to others, as well make your website accessible for accessibility applications such as screen readers.
What are the benefits of using semantic tags in our HTML?
It makes the code more readable to others, and you later for when revisiting the code. Additionally, as noted above, websites need to be build so they are accessible to others. Using the write elements will make your website accessible for accessibility applications such as screen readers. Proper use of semantic tags will also increase your page’s search rankings.
- Store information within variable which can be used in later parts of the code.
- Can execute code based on certain events in the website.
- Internal reference - You can use the tag
<script> </script>
which encapsulate JS code right within the<head>
tag of the HTML file.- External reference - JS code will be stored in .js files. These files are tied to the HTLM code much like an CSS file can be attached to an HTML file through a source.
- Inline JavaScript handles - this JS code is actually within the HTML file, and not the head like an internal reference.