In Part 1, you will get comfortable with writing markup, and with separating content from design and layout.
Stub out index.html
with these basic elements:
1<!DOCTYPE html>
2
3<html>
4 <head>
5 <title></title>
6 </head>
7
8 <body></body>
9</html>
You can now fill each element with some appropriate content.
Your mission is to build a page that:
<p>
,
<header>
, <footer>
, <main>
, <article>
. If you need
to review any of these tags, check out the HTML tag reference at w3schools.<img>
tag (hopefully more). When placing
images in your page, put them in a new subfolder called images
within your html-me-something
directory.©
, but you should also try to get creative here.Once you finish your page, use Git to add
and commit
your
index.html
changes.
Why commit again?
The reason is that you added a bunch of new HTML code to your index.html
file. It is now in a very different state compared to the first time you
committed it. See this for yourself by checking the status:
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: index.html
no changes added to commit (use "git add" and/or "git commit -a")
Git tells us:
I see that you have modifiedindex.html
. Usegit add
if you want these changes to be included in your next commit.
The Git workflow more or less comes down to this:
init
add
and commit
add
and commit
add
and commit
The general rule is that whenever you make any changes, you must add and commit those changes to Git.
So let’s do that. From within your root html-me-something/
directory:
$ git add index.html
$ git commit -m "Finished work on HTML page"
You might be wondering: How do I know when it’s time to pause working and do another commit?
This is somewhat subjective, and is ultimately up to you. The good habit is to pause and commit any time you reach a natural stopping point or complete a coherent chunk of work.
Now that you have made a new commit, push your work to your remote repository using the git push
command.
Well done! You may notice that you haven't got a green check mark on your repository yet. Time to dive into some CSS.