h & p
In this module we'll start to study some of the most commonly used tags in HTML. Here are the module objectives:
Discussion of h & p tags with a few examples.
Show descending h tags.
Show hr & br tags for organizing.
Run browser and show completed Two Truths, One Lie game.
Recreate step 4 with own details.
File Location
For this module, you should be working in the following location:
javascript-library
└── 0-PreWork
└── 1-HTML-Basics
02-h&p-tags.html <---You should be here.
└── 2-CSS-Basics
└── 3-JavaScript-BasicsStart Code
Get started with by adding the following code to the file. Helpful tip: To get the starting structure for an HTML page, type ! then tab. It should scaffold out the html code:
Example Code
Let's start with the h tag. This is probably the most used tag. h defines html headings, and there are 6 different sizes. Add the following code to the file:
After running the code, you should see 6 different sizes of heading tags in your browser window.
p Tags
Another extremely common tag is the p tag. A p tag defines a paragraph and has some default settings for paragraphs on it:
Two Truths One Lie
Here's a task to get you some more practice with HTML. Create a Two Truths, One Lie HTML page about yourself.
Final Code
Last updated