-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
192 lines (173 loc) · 6.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html lang="en-US">
<head>
<!-- viewport to make your website look good on all devices -->
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- meta charset="utf-8" -->
<meta name="lang" content="en-US">
<!-- for search engines -->
<meta name="keywords" content="HTML5 Template Page">
<meta name="description" content="HTML5 Template with almost empty CSS and JavaScript Nodes">
<meta name="author" content="Robert Halter">
<!-- link rel="stylesheet" href="styles/style.css" -->
<style>
/* move to styles/styles.css */
html * {
font-family: sans-serif;
font-size: 16px;
line-height: 1.625;
/* default line-height is about 110% to 120% */
/* 26px = 1.625 * font-size 16px */
/* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_colors/Applying_color */
/* https://www.w3schools.com/colors/colors_names.asp */
color: #000033;
/* https://color-hex.org/color/000033 contains mainly BLUE color. */
/* https://developer.mozilla.org/en-US/docs/Web/CSS/Layout_cookbook */
}
section {
display: flex;
flex-direction: column;
}
aside {
float: right;
background-color: lightblue;
}
</style>
<!-- <script src="scripts/main.js"></script> -->
<script>
// move to scripts/main.js
// empty inline script
// JavaScript Standard Style
// https://standardjs.com/
// Rules
// https://standardjs.com/rules.html
console.log('inline script is run')
</script>
<title>HTML5 Template Page</title>
</head>
<body>
<!--main structure use of common HTML5 elements -->
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML -->
<!-- https://www.w3schools.com/html/html_layout.asp -->
<!-- https://www.w3schools.com/html/html5_semantic_elements.asp -->
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories -->
<!-- Beginner Tip for layout your page: -->
<!-- use -->
<!-- do NOT using tables for layout -->
<!-- HTML tables should be used for tabular data — this is what they are designed for. -->
<!-- see -->
<!-- https://developer.mozilla.org/en-US/docs/Learn/HTML/Tables/Basics#when_should_you_not_use_html_tables -->
<header>
<!-- header of document -->
Header of document text.
<hr>
</header>
<nav>
<!-- Navigation often links -->
Navigation |
<a href="https://developer.mozilla.org" target="_blank">MDN Web Docs</a>
<!-- CSS, HTML, JavaScript, and Web APIs. --> |
<a href="https://www.w3schools.com/" target="_blank">w3schools Learn to Code</a>
<hr>
</nav>
<main>
<!-- main specifies the main content of this document -->
<!-- only ONE main element in the document. -->
<section>
<header>
<!-- header of section -->
Header text of 'section with articles'.
<hr>
</header>
<!--Added hgroup to this group of text. Phillip Andrews-->
<hgroup>
<h2>Section with articles</h2>
<p>This tag is used to split a page into sections like Introduction, Contact Information, Details, etc.</p>
<p>Section defines the type of content.</p>
<p>A section can have nested sections.</p>
</hgroup>
<article>
<header>
<!-- header of article -->
Header text of 'article in section'.
<hr>
</header>
<aside>
<header>
<!-- header of aside -->
Header text of aside.
<hr>
</header>
<h2>Aside</h2>
Aside text.
<footer>
<!-- footer of aside -->
<hr>
Footer text of aside.
</footer>
</aside>
<!--Added hgroup to this group of text. Phillip Andrews-->
<hgroup>
<h2>The article</h2>
<p>The article contains independent content that does not require any other context.</p>
<p>Articles will contain the specific contents in that type of section.</p>
<p>But placing article inside of section is good practice.</p>
</hgroup>
<footer>
<!-- footer of article -->
<hr>
Footer text of 'acticle in section'.
</footer>
</article>
<footer>
<!-- footer of section -->
<hr>
Footer text of 'section with articles'.
</footer>
</section>
<hr>
<section>
<header>
<!-- header of section -->
Header text of 'section with details / summary pairs'.
<hr>
</header>
<h2>Section with details / summary pairs</h2>
<p>Details can be opend and closed.</p>
<p>Details can have nested details.</p>
<details open>
<summary>Summary of parent Detail</summary>
Parent detail text.
<details open>
<summary>Summary of child Detail</summary>
Child detail text.
</details>
</details>
<footer>
<!-- footer of section -->
<hr>
Footer text of 'section with details / summary pairs'.
</footer>
</section>
</main>
<footer id="footerOfDocument">
<!-- footer of document -->
<hr>
Footer text of document.
<div>validated with: <a href="https://validator.w3.org/#validate_by_input" target="_blank">W3C Markup Validation
Service</a></div>
<script>
// in footer of document add autor from header meta
const author = document.getElementsByName("author")[0].getAttribute("content");
// console.log("author:");
// console.log(author);
const newTextNode = document.createTextNode("author: " + author);
const newDivElement = document.createElement("div");
newDivElement.appendChild(newTextNode);
const footerOfDocumentElement = document.getElementById("footerOfDocument");
footerOfDocumentElement.appendChild(newDivElement);
</script>
</footer>
</body>
</html>