Code

Start Coding


Starting your page

Whenever you code using HTML, your page must have some elements: First, you write <!DOCTYPE html>. Under that, you write <html></html>. Between <html> and </html>, you write <head></head><body></body>. ALL THE MAIN CODE GOES INTO THE BODY SECTION. Here's an example:

Intro to tags

We code our entire HTML webpage -- headings, paragraphs, images, etc. using tags. A tag denotes the start and end of an element in your webpage, like a heading, paragraph, etc. To code an element of your webpage, you use its designated tag, and you type <element> stuff to put </element>. Here's an example of a paragraph tag:

This code will yield a paragraph that says "This is a paragraph."

Images created by Vibhu Akella, accessed from Codehs.com.