Star Wars Setup
Before we start talking about JavaScript, we're going to create our HTML page for this application!
File Structure
We will be working with the following files:
You guys are familiar with HTML, so we're just going to set up a pretty basic HTML page. Let's look at the <head>
of our HTML page. We have a lot of the normal stuff in here. The title
of our application will be "Star Wars People" since that's the API endpoint we're working with. Type the following code in your index.html
file.
Let's next look at the body of this page. Here, we're setting up a structure to frame and display the information we pull back from the API. Notice that we create an unordered list and say that the JavaScript items will load here. Lastly, we've put a script tag with a source of our star-wars-scripts.js
.
This should all look pretty familiar. If you've forgotten what any of these HTML tags do, use google to refresh your memory!
Next, we'll look at the JavaScript portion of our little app and how to utilize fetch and APIs.
Last updated