Lab 02: Introduction, HTML Structure
Objective
- Practice HTML structure and the different between document sections (header, and body).
- Practice mostly used HTML tags.
- Learn how to build a web page using HTML elements for form, table, bullet/numbering/multilevel lists.
- HTML layout design principle
Current Lab Learning Outcomes (LLO)
By the end of this lab activity, you should be able to:
- Understand the basic structure of a web page.
- Use a number of HTML markup tags for building web pages
- Create a webpage for scheduling meetings
- Publish and host a static web page.
Lab Requirements
Code editor (e.g., VS Code), a web browser, git, and a free GitHub account.
Lab Assessment
Consider the following starter HTML code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello, world!</title>
</head>
<body>
here is a body
</body>
</html>
- Create an HTML document (e.g., lab2.html) with the following content:
- The document title is “CPIT-405 lab 2” (
<title>) and the page title is “Lab 2: HTML” (<h1>). - Add a link (
<a>) to “https://cpit405.gitlab.io”. - In the
<body>, add two paragraphs (<p>) with any text you like. Please, separate these two tags with a horizontal rule tag (hr). - Add a clickable image (link (
<a>) with image (<img>)). Use any image and any link you like and be sure to add an alternative text to the image.
- create 5 paragraphs (
<p>) of any text and use the following tags inside each paragraph:
<strong><em><sup><sub><span>
- Add the following HTML headings to the HTML document. The number of #s below indicates of heading’s level (e.g.,
#=><h1>,##=><h2>, etc.).
# Heading elements
## Summary
Some text here...
## Examples
### Example 1
Some text here...
### Example 2
Some text here...
## See also
Some text here...
Add the following lists to your HTML document:
- An ordered list
<ol>with 3 items<li>. - An unordered list
<ul>with 3 items<li>. - A definition list
<dl>with 2 pairs of term<dt>and description or definition<dd>
- An ordered list
Create the table
<table>below where the first row (<tr>) is the heading row (<th>):
| Basics | Front-end Frameworks | Server-side frameworks |
|---|---|---|
| HTML | React | Spring |
| CSS | Angular | Django |
| JS | Vue | Laravel |
- Create a form (
<form>) with two inputs (<input>) for login and password) and a submit button (<input>).
Submission
- Create a new repository on GitHub.
- Push your html page into the repository.
- Enable GitHub pages for the repository.
- Submit a link to the web page hosted on GitHub pages.