# Read 01

## Answers

### Getting Started

1. Compose a short poem describing how HTTP sends data between computers.

   - First you direct your browser to look up a URL
   - Then your browser will look up an IP, and does it so well
   - Next your browser sends a request of HTTP
   - And then the host sends back a response, really quickly
   - The last step is the browser rendering the response
   - And that's how you'd describe this process like a poetic renaissance
  
2. Describe how HTML, CSS, and JS files are “parsed” in the browser.

   - Parsing is the step the browser takes to turn the data it receives over the network into the DOM and CSSOM, which is used by the renderer to paint a page to the screen. The browser recognises any links such as < sript > or < link > and will then parse them in the order of HTML, CSS, and then Javascript.
  
3. How can you find images to add to a Website?

   - By using a search engine
  
4. How do you create a String vs a Number in JavaScript?

   - A string has to be in '', a number does not
  
5. What is a Variable and why are they important in JavaScript?

   - Variables are containers that store values. They are impportant as they are necessary to do anything interesting in programming. If values couldn't change, then you couldn't do anything dynamic, like personalise a greeting message or change an image displayed in an image gallery.
  
### Introduction to HTML

1. What is an HTML attribute?

   - An attribute is extra information about the element that won't appear in the content
  
2. Describe the Anatomy of an HTMl element.

   - An element starts with an opening tag. This is of the name of the element (ie  < p > for paragraph), wrapped in opening and closing angle brackets.
   - Then it is the content. This will usually be what is on display, such as the text of the paragraph.
   - And ends with the closing tag, which is the same as the opening tag, except that it includes a forward slash before the element name.
  
3. What is the Difference between <article> and <section> element tags?

   -  The < article > tag specifies independent, self-contained content. The < section > tag defines sections in a document, such as chapters, headers, footers, or any other sections of the document.

4. What Elements does a “typical” website include?

   - < !DOCTYPE html >, < html >, < head >, < meta charset="utf-8" >, < title >, < body >, < header >, and < footer >.
  
5. How does metadata influence Search Engine Optimization?

   - Specifying a description that includes keywords relating to the content of your page is useful as it has the potential to make your page appear higher in relevant searches performed in search engines.
  
6. How is the <meta> HTML tag used when specifying metadata?

   - Metadata is data (information) about data. < meta > tags always go inside the <head> element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.
  
### How to start to design a Website

1. What is the first step to designing a Website?

   - It's having an idea about the what goals and vision, and seeing what you actually want to achieve.
  
2. What is the most important question to answer when designing a Website?

   - What exactly do I want to accomplish? How will a website help me reach my goals? What needs to be done, and in what order, to reach my goals?

### Semantics

1. Why should you use an < h1 > element over a < span > element to display a top level heading?

   - Search engines will consider its contents as important keywords to influence the page's search rankings (see SEO)
   - Screen readers can use it as a signpost to help visually impaired users navigate a page
     
2. What are the benefits of using semantic tags in our HTML?

   - Finding blocks of meaningful code is significantly easier than searching through endless divs with or without semantic or namespaced classes
   - Suggests to the developer the type of data that will be populated
   - Semantic naming mirrors proper custom element/component naming

### What is JavaScript?

1. Describe 2 things that require JavaScript in the Browser?

   - Most things that take a static website and make it dybamic, such as displaying timely content updates, or interactive maps

2. How can you add JavaScript to an HTML document?

   - There are three ways to add Javascript in to an HTML document, they are:
       - Externally. This is creating a Javascript file (eg script.js) and linking to this with a link such as < script src="script.js" defer >< /script >. This is the most favoured method.
       - Internally. Having your Javascript code on the HTML page inbetween < script > and < /script > tags.
       - Inline. This is when the script is inside an HTML element tag. This is seen as bad practice.
