Skip to content

Commit fc3da89

Browse files
committed
clarified head wording and expanded with metadata example
1 parent dfb11b7 commit fc3da89

File tree

1 file changed

+33
-9
lines changed

1 file changed

+33
-9
lines changed

sites/en/frontend/HTML_structure.step

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ overview do
1010

1111
## The HTML tag and Doctype
1212

13-
The line `<!DOCTYPE html>` is called the doctype, and it tells the browser which flavor of HTML you're using. `<!DOCTYPE html>` tells your browser you're using HTML5, the latest version of HTML.
13+
The line `<!DOCTYPE html>` is called the doctype, and it tells the browser which flavor of HTML you're using. `<!DOCTYPE html>` tells your browser you're using HTML5, the latest version of HTML.
1414

1515
(You may see older doctypes out there that are longer and a lot more complicated, from when people
1616
used various HTML and XHTML versions, but those are annoying, and you can usually just
@@ -24,25 +24,50 @@ The `<html>` encloses all the rest of your page, and states unequivocally, "Here
2424
source_code :html, <<HTML
2525
<!DOCTYPE html>
2626
<html>
27-
<head>Invisible, Important Stuff</head>
28-
<body>Actual Visible Content</body>
27+
<head>
28+
<!-- Important invisible details will go here! -->
29+
</head>
30+
<body>
31+
Actual Visible Content
32+
</body>
2933
</html>
3034
HTML
3135
message <<-MARKDOWN
3236

3337
### The Head
3438

35-
The head contains information _about_ the document, including:
39+
The head contains information about the metadata (data that describes data), including:
3640

37-
* what language or character set you're using
38-
* what the page title should be
39-
* what CSS and JavaScript files to include (and where they are)
41+
What language or character set you're using: `<meta charset="utf-8">`
4042

41-
Information in the `<head>` section is __not__ displayed.
43+
What the page title should be: `<title>HTML!</title>`
44+
45+
What CSS and JavaScript files to include (and where they are):
46+
47+
`<link rel="stylesheet" href="style.css">`
48+
49+
Information in the `<head>` section should __not__ be displayed on your browser.
4250

4351
It can also contain metadata tags that can tell a search engine or another
4452
program more about the file, like who wrote it or what keywords are relevant.
4553

54+
MARKDOWN
55+
source_code :html, <<HTML
56+
<!DOCTYPE html>
57+
<html>
58+
<head>
59+
<title>HTML: Head</title>
60+
<link rel="stylesheet" href="mystyle.css">
61+
62+
<meta charset="utf-8">
63+
<meta name="keywords" content="HTML, CSS, JavaScript, Meta">
64+
<meta name="description" content="Learning HTML, CSS, & JS one step at a time.">
65+
</head>
66+
</html>
67+
HTML
68+
message <<-MARKDOWN
69+
70+
4671
### The Body
4772

4873
The Body contains the actual content of your file, the things you'll want your users
@@ -80,4 +105,3 @@ When you refresh your browser, you should see the title on the tab in Chrome.
80105
end
81106

82107
next_step "basic_CSS"
83-

0 commit comments

Comments
 (0)