Getting Started Skim How the Web Works. Skim Website Design and Process. Read the following sections of JavaScript Basics: Start at “What is JavaScript?”, read through “Comments” section.
- Client request
- this is the best
- Server responds
- this is the bomb
They are parsed in this order:
- HTML
- CSS
- JS
- Go to Google Images and search.
- When you find the image you want, click on the image to get an enlarged view of it.
- Right-click the image (Ctrl + click on a Mac), choose Save Image As…, and choose a safe place to save your image. Alternatively, copy the image's web address from your browser's address bar for later use.
To signify that the value is a string, enclose it in single quote marks. let myVariable = 'Bob'; Numbers don't have quotes around them. let myVariable = 10;
Variables are containers that store values Variables are necessary to do anything interesting in programming. If values couldn't change, then you couldn't do anything dynamic, like personalize a greeting message or change an image displayed in an image gallery.
Getting Started with HTML. HTML Document Structure. Metadata in HTML.
Attributes contain extra information about the element that won't appear in the content.
- The opening tag: This consists of the name of the element wrapped in opening and closing angle brackets.
- The content: This is the content of the element.
- The closing tag: This is the same as the opening tag, except that it includes a forward slash before the element name.
<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). <section> is similar to <article>, but it is more for grouping together a single part of the page that constitutes one single piece of functionality
- : The element. This element wraps all the content on the page. It is sometimes known as the root element.
- : The element.
- : The element. This element represents metadata that cannot be represented by other HTML meta-related elements, like , , <script>, <style> or <title>.
- <title></title>: The <title> element.
- : The element.
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
Metadata is data that describes data, and HTML has an "official" way of adding metadata to a document — the element.
- Planning- What will it do?
- Sketch out your design
- Choosing your assets- what content will appear on your webpage ie
- Text
- Theme Color
- Images
- Font
What exactly do I want to accomplish?
the <h1> element gives the text it wraps around the role of a top level heading on your page.
It gives the piece of code meaning.
control multimedia, animate images
JavaScript only needs one friend in the world of HTML — the <script> element
- First of all, make a local copy of our example file apply-javascript.html. Save it in a directory somewhere sensible.
- Open the file in your web browser and in your text editor. You'll see that the HTML creates a simple web page containing a clickable button.
- Next, go to your text editor and add the following in your head — just before your closing tag:
Copy to Clipboard 4. Now we'll add some JavaScript inside our <script> element to make the page do something more interesting 5. Save your file and refresh the browser — now you should see that when you click the button, a new paragraph is generated and placed below.
- First, create a new file in the same directory as your sample HTML file. Call it script.js — make sure it has that .js filename extension, as that's how it is recognized as JavaScript.
- Replace your current "<script>" element with the following: "<script src="script.js" defer></script>" Copy to Clipboard
- Inside script.js, add the following script:
- Save and refresh your browser, and you should see the same thing