First Page
You'll write one HTML file by hand in a plain text editor, open it in a browser, and have a website of your own before bed.
About
Every site on the internet is, at bottom, a set of text files that a browser reads, and this badge has you write one yourself. There's no site builder here, no template, and no pasting from a tutorial you don't understand, because the point is to type every tag and see what it does. A text editor and a browser are all you need, and you already have both. It will look plain, and that's fine, because a plain page you understand beats a fancy one you don't. Most first pages are a title, a couple of paragraphs and a photo, and that's a real website.
At a glance
- Per requirement
- 15 XP
- Completion bonus
- 75 XP
- Requirements
- 5
- Takes
- One evening
- Skill level
- Novice (never tried it)
- Cost
- Free
- Supplies
- Nothing special
- Where
- At home
- Other people
- On your own
Requirements
-
1
Write an HTML file by hand in a plain text editor. Use Notepad, TextEdit in plain text mode, or any code editor, and save the file as index.html. Put in a doctype, a title, one h1, two paragraphs about anything true, and one link to a site you like. Type every character yourself rather than pasting, because that's how the tags start to make sense. Take a screenshot of the editor with the whole file showing. Photo
-
2
Open it in a browser straight from your own disk. Double-click the file or drag it into a browser window, and the address bar will start with file://. If you see raw tags on the screen instead of a page, you saved it as .txt, so go back and save it again as .html. Take a screenshot of the page with the file:// address visible. Photo
-
3
Add a photo you took yourself. Put the photo in the same folder as the page and add an img tag with a src and an alt that says what's in the picture. Resize the photo to under 500 KB first, because dropping a 4 MB phone photo onto a page is the most common beginner mistake and makes the page crawl. Take a screenshot of the page with the image showing. Photo
-
4
Make a second page and link the two together. about.html is the usual choice. Link index to about and about back to index using relative paths, not the full path from your hard drive, or the links will break the moment the site leaves your computer. Film yourself clicking back and forth between the two pages. Video
-
5
Run it through the validator and fix everything it finds. Paste your file into the W3C markup validator at validator.w3.org. It will find something, like an unclosed tag, a missing lang attribute or an img with no alt, and that's normal for a first page. Fix every error until it comes back clean. Take a screenshot of the passing result. Photo