Skip to content

Commit d2a8f21

Browse files
committed
section-3: Sized and centered components.
1 parent 76314de commit d2a8f21

File tree

2 files changed

+132
-124
lines changed

2 files changed

+132
-124
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 127 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -16,135 +16,138 @@ <h4>The Basic Language of the Web: HTML</h4>
1616
<h5>The Basic Language of the Web: HTML</h5>
1717
<h6>The Basic Language of the Web: HTML</h6>
1818
-->
19-
<header class="main-header">
20-
<h1>📘 The Code Magazine</h1>
21-
22-
<nav>
23-
<a href="blog.html">Blog</a>
24-
<a href="#">Challenges</a>
25-
<a href="#">Flexbox</a>
26-
<a href="#">CSS Grid</a>
27-
</nav>
28-
</header>
29-
30-
<article>
31-
<header class="post-header">
32-
<h2>The Basic Language of the Web: HTML</h2>
33-
34-
<img
35-
src="img/laura-jones.jpg"
36-
alt="Headshot of Laura Jones"
37-
height="50"
38-
width="50"
39-
/>
40-
41-
<p id="author">Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027</p>
42-
43-
<img
44-
src="img/post-img.jpg"
45-
alt="HTML code on a screen"
46-
class="post-image"
47-
width="500"
48-
height="200"
49-
/>
19+
20+
<div class="container">
21+
<header class="main-header">
22+
<h1>📘 The Code Magazine</h1>
23+
24+
<nav>
25+
<a href="blog.html">Blog</a>
26+
<a href="#">Challenges</a>
27+
<a href="#">Flexbox</a>
28+
<a href="#">CSS Grid</a>
29+
</nav>
5030
</header>
5131

52-
<p>
53-
All modern websites and web applications are built using three
54-
<em>fundamental</em>
55-
technologies: HTML, CSS and JavaScript. These are the languages of the
56-
web.
57-
</p>
58-
59-
<p>
60-
In this post, let's focus on HTML. We will learn what HTML is all about,
61-
and why you too should learn it.
62-
</p>
63-
64-
<h3>What is HTML?</h3>
65-
<p>
66-
HTML stands for <strong>H</strong>yper<strong>T</strong>ext
67-
<strong>M</strong>arkup <strong>L</strong>anguage. It's a markup
68-
language that web developers use to structure and describe the content
69-
of a webpage (not a programming language).
70-
</p>
71-
<p>
72-
HTML consists of elements that describe different types of content:
73-
paragraphs, links, headings, images, video, etc. Web browsers understand
74-
HTML and render HTML code as websites.
75-
</p>
76-
<p>In HTML, each element is made up of 3 parts:</p>
77-
78-
<ol>
79-
<li>The opening tag</li>
80-
<li>The closing tag</li>
81-
<li>The actual element</li>
82-
</ol>
83-
84-
<p>
85-
You can learn more at
86-
<a
87-
href="https://developer.mozilla.org/en-US/docs/Web/HTML"
88-
target="_blank"
89-
>MDN Web Docs</a
90-
>.
91-
</p>
92-
93-
<h3>Why should you learn HTML?</h3>
94-
95-
<p>
96-
There are countless reasons for learning the fundamental language of the
97-
web. Here are 5 of them:
98-
</p>
99-
100-
<ul>
101-
<li>To be able to use the fundamental web dev language</li>
102-
<li>
103-
To hand-craft beautiful websites instead of relying on tools like
104-
Worpress or Wix
105-
</li>
106-
<li>To build web applications</li>
107-
<li>To impress friends</li>
108-
<li>To have fun 😃</li>
109-
</ul>
110-
111-
<p>Hopefully you learned something new here. See you next time!</p>
112-
</article>
113-
114-
<aside>
115-
<h4>Related posts</h4>
116-
117-
<ul class="related-posts">
118-
<li>
32+
<article>
33+
<header class="post-header">
34+
<h2>The Basic Language of the Web: HTML</h2>
35+
11936
<img
120-
src="img/related-1.jpg"
121-
alt="Person programming"
122-
width="75"
123-
width="75"
37+
src="img/laura-jones.jpg"
38+
alt="Headshot of Laura Jones"
39+
height="50"
40+
width="50"
12441
/>
125-
<a href="#">How to Learn Web Development</a>
126-
<p class="related-author">By Jonas Schmedtmann</p>
127-
</li>
128-
<li>
129-
<img src="img/related-2.jpg" alt="Lightning" width="75" heigth="75" />
130-
<a href="#">The Unknown Powers of CSS</a>
131-
<p class="related-author">By Jim Dillon</p>
132-
</li>
133-
<li>
42+
43+
<p id="author">Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027</p>
44+
13445
<img
135-
src="img/related-3.jpg"
136-
alt="JavaScript code on a screen"
137-
width="75"
138-
height="75"
46+
src="img/post-img.jpg"
47+
alt="HTML code on a screen"
48+
class="post-image"
49+
width="500"
50+
height="200"
13951
/>
140-
<a href="#">Why JavaScript is Awesome</a>
141-
<p class="related-author">By Matilda</p>
142-
</li>
143-
</ul>
144-
</aside>
145-
146-
<footer>
147-
<p id="copyright" class="copyright text">Copyright &copy; 2027 by The Code Magazine.</p>
148-
</footer>
52+
</header>
53+
54+
<p>
55+
All modern websites and web applications are built using three
56+
<em>fundamental</em>
57+
technologies: HTML, CSS and JavaScript. These are the languages of the
58+
web.
59+
</p>
60+
61+
<p>
62+
In this post, let's focus on HTML. We will learn what HTML is all about,
63+
and why you too should learn it.
64+
</p>
65+
66+
<h3>What is HTML?</h3>
67+
<p>
68+
HTML stands for <strong>H</strong>yper<strong>T</strong>ext
69+
<strong>M</strong>arkup <strong>L</strong>anguage. It's a markup
70+
language that web developers use to structure and describe the content
71+
of a webpage (not a programming language).
72+
</p>
73+
<p>
74+
HTML consists of elements that describe different types of content:
75+
paragraphs, links, headings, images, video, etc. Web browsers understand
76+
HTML and render HTML code as websites.
77+
</p>
78+
<p>In HTML, each element is made up of 3 parts:</p>
79+
80+
<ol>
81+
<li>The opening tag</li>
82+
<li>The closing tag</li>
83+
<li>The actual element</li>
84+
</ol>
85+
86+
<p>
87+
You can learn more at
88+
<a
89+
href="https://developer.mozilla.org/en-US/docs/Web/HTML"
90+
target="_blank"
91+
>MDN Web Docs</a
92+
>.
93+
</p>
94+
95+
<h3>Why should you learn HTML?</h3>
96+
97+
<p>
98+
There are countless reasons for learning the fundamental language of the
99+
web. Here are 5 of them:
100+
</p>
101+
102+
<ul>
103+
<li>To be able to use the fundamental web dev language</li>
104+
<li>
105+
To hand-craft beautiful websites instead of relying on tools like
106+
Worpress or Wix
107+
</li>
108+
<li>To build web applications</li>
109+
<li>To impress friends</li>
110+
<li>To have fun 😃</li>
111+
</ul>
112+
113+
<p>Hopefully you learned something new here. See you next time!</p>
114+
</article>
115+
116+
<aside>
117+
<h4>Related posts</h4>
118+
119+
<ul class="related-posts">
120+
<li>
121+
<img
122+
src="img/related-1.jpg"
123+
alt="Person programming"
124+
width="75"
125+
width="75"
126+
/>
127+
<a href="#">How to Learn Web Development</a>
128+
<p class="related-author">By Jonas Schmedtmann</p>
129+
</li>
130+
<li>
131+
<img src="img/related-2.jpg" alt="Lightning" width="75" heigth="75" />
132+
<a href="#">The Unknown Powers of CSS</a>
133+
<p class="related-author">By Jim Dillon</p>
134+
</li>
135+
<li>
136+
<img
137+
src="img/related-3.jpg"
138+
alt="JavaScript code on a screen"
139+
width="75"
140+
height="75"
141+
/>
142+
<a href="#">Why JavaScript is Awesome</a>
143+
<p class="related-author">By Matilda</p>
144+
</li>
145+
</ul>
146+
</aside>
147+
148+
<footer>
149+
<p id="copyright" class="copyright text">Copyright &copy; 2027 by The Code Magazine.</p>
150+
</footer>
151+
</div>
149152
</body>
150153
</html>

starter/03-CSS-Fundamentals/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ nav {
132132
font-size: 16px;
133133
}
134134

135+
.container {
136+
margin: 0 auto;
137+
width: 800px;
138+
}
139+
135140
.related-author {
136141
font-size: 18px;
137142
font-weight: bold;

0 commit comments

Comments
 (0)