@extends('template')
@section('title')
HTML/CSS Lab
@stop
@section('content')
# HTML
## HTML: The code behind web pages
- All web pages are structured using HTML code.
- You can always see the HTML code by chosing View |Developer |View Source in the Chrome browser (or Ctrl+Click
on the web page and choose View Page Source).
- Hands-on learning of HTML with [W3 Schools website](http://www.w3schools.com/html/default.asp). **We strongly
recommend this, especially if you have never worked with HTML before.**
- [HTML Element reference](https://www.w3schools.com/TAgs/).
## Task 1a: Your first page
Save the following code as `top5.html` in your `ps08` folder.
```html
Last FM Top 5
```
Load this file in Google Chrome by...
- dragging the `top5.html` file into your browser window
- or go to `File: Open...`
Once it's loaded, you should see a blank white page:
The above code is a basic web page template. Note how it's divided into two main pieces (the screenshot
below doesn't refer to our file example):
1. The `head` where all **configuration** information about your page will go.
2. The `body` where the **content** of your page will go.
With your file set up, you're ready to start writing some HTML. With each edit you make below, save your changes and refresh the browser to see the results.
**Tip: Re-opening HTML files:** If you close your `top5.html` file in Canopy and try to re-open it, Canopy will display it as a web page, rather than showing you the HTML code.
To get around this, right click `top5.html` in the File Browser and choose `Open With > Code Editor`.
## Tag basics
HTML is a tag based language.
Tags are used to surround content, for example, here's a Heading 1 (`h1`) tag:
```
Top 5 Artists
```
The forward slash in the second tag (``) indicates it's the **end tag**.
The combination of the `start tag` + `content` + `end tag` is called an **element**.
### Task 1b: Add a heading
Add `Top 5 Artists
` in the `` of your page.
```html
Top 5 Artists
```
## Tag teamwork
Some tags work together with other tags.
For example, an `` ([unordered list](https://www.w3schools.com/TAgs/tag_ul.asp)) tag teams up with `- ` ([list item](https://www.w3schools.com/TAgs/tag_li.asp)) tags
```html
- Apples
- Oranges
- Pears
- Grapes
```
### Task 1c: Add unordered list
Below your `