You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sites/en/frontend/HTML_structure.step
+33-9Lines changed: 33 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ overview do
10
10
11
11
## The HTML tag and Doctype
12
12
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.
14
14
15
15
(You may see older doctypes out there that are longer and a lot more complicated, from when people
16
16
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
24
24
source_code :html, <<HTML
25
25
<!DOCTYPE html>
26
26
<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>
29
33
</html>
30
34
HTML
31
35
message <<-MARKDOWN
32
36
33
37
### The Head
34
38
35
-
The head contains information _about_ the document, including:
39
+
The head contains information about the metadata (data that describes data), including:
36
40
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">`
40
42
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.
42
50
43
51
It can also contain metadata tags that can tell a search engine or another
44
52
program more about the file, like who wrote it or what keywords are relevant.
0 commit comments