Skip to content

Commit 4421c37

Browse files
committed
implementing box model
1 parent 8aa2975 commit 4421c37

File tree

2 files changed

+146
-135
lines changed

2 files changed

+146
-135
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 140 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<link href="style.css" rel="stylesheet" />
66
<title>The Basic Language of the Web: HTML</title>
77
</head>
8-
9-
<body>
10-
<!--
8+
<div class="container">
9+
<body>
10+
<!--
1111
<h1>The Basic Language of the Web: HTML</h1>
1212
<h2>The Basic Language of the Web: HTML</h2>
1313
<h3>The Basic Language of the Web: HTML</h3>
@@ -16,142 +16,148 @@ <h5>The Basic Language of the Web: HTML</h5>
1616
<h6>The Basic Language of the Web: HTML</h6>
1717
-->
1818

19-
<header class="main-header">
20-
<h1>📘 The Code Magazine</h1>
21-
22-
<nav>
23-
<!-- <strong>this is a para</strong> -->
24-
<a href="blog.html">Blog</a>
25-
<a href="#">Challenges</a>
26-
<a href="#">Flexbox</a>
27-
<a href="#">CSS Grid</a>
28-
</nav>
29-
</header>
30-
31-
<article>
32-
<header class="post-header">
33-
<h2>The Basic Language of the Web: HTML</h2>
34-
35-
<img
36-
src="img/laura-jones.jpg"
37-
alt="Headshot of Laura Jones"
38-
height="50"
39-
width="50"
40-
/>
41-
42-
<p id="author">
43-
Posted by <strong>Laura Jones</strong> on Monday, June 21st 2027
44-
</p>
19+
<header class="main-header">
20+
<h1>📘 The Code Magazine</h1>
4521

46-
<img
47-
class="post-image"
48-
src="img/post-img.jpg"
49-
alt="HTML code on a screen"
50-
width="500"
51-
height="200"
52-
/>
22+
<nav>
23+
<!-- <strong>this is a para</strong> -->
24+
<a href="blog.html">Blog</a>
25+
<a href="#">Challenges</a>
26+
<a href="#">Flexbox</a>
27+
<a href="#">CSS Grid</a>
28+
</nav>
5329
</header>
5430

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

starter/03-CSS-Fundamentals/style.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ body {
88
font-family: sans-serif;
99
border-top: 10px solid #1098ad;
1010
}
11-
11+
.container {
12+
width: 800px;
13+
/* margin-left: auto;
14+
margin-right: auto; */
15+
margin: 0 auto;
16+
}
1217
nav {
1318
font-size: 18px;
1419
}

0 commit comments

Comments
 (0)