In-class Exercises
Part 1: Putting things online with Glitch
- If you don't have one already, create a GitHub account.
- Use your GitHub account to log in to Glitch.
- Click New Project then hello-webpage.
- Click the assets folder in the left of the page.
- Upload a few images and get the URLs for them.
Part 2: HTML
- Open the file index.html in the Glitch site from the previous part.
- Click Show, then In a new window near the top left of the page and see the current page.
- Find the
<body>
and</body>
in index.html. - On the lines between the two body tags, add some text.
- Click Show live again or return to the tab where you saw the page before. You should see your text there now too.
Part 3: HTML tags
- Open the file index.html in the Glitch site from the previous part.
- Add a link in the body tags:
Change the URL and text to something more interesting. Refresh the page in your browser.<a href="http://example.com">visit example.com</a>
- Show one of the images you uploaded on your page. Start with:
and put the URL for the image in the quotation marks.<img src="" />
- Experiment with other tags from the HTML reference.
Part 4: Embedding a Carto map in HTML
- Open the file index.html in Glitch.
- Open a map in Carto, go to Publish > Embed it and copy the HTML.
- Paste the embed code in the body of your HTML page in Glitch.
Part 5: HTML in Carto
- Open one of your Carto maps.
- Link to the data source from the legend.
- Change the popups using some HTML.