Skip to main content

HTML

HTML is what we use to "mark up" a document.

Some useful links:

A basic webpage​

Save this file as index.html and open it in your browser.

Let's break down what's going on here.

  • the <!doctype html> string tells the browser that this is a modern HTML document. If you omit this, your page should mostly work, but unexpected things may happen since the browser will think it's dealing with a page from the 1990s/early 2000s.
  • the <html> tag goes around the entire document.
  • the <head> tag contains metadata about your document. The
  • the <body> tag is where all the user-visible content goes.

Basic elements​

Here is an interactive example showcasing all of the basic text tags.

Tables​

Here is an interactive example showing how to make tables.

Relevant tags:

  • <table> goes around the whole table
  • <thead>, <tbody>, and <tfoot> delinate the table header, body, and footer. You do not need to include a header/footer.
  • <tr> is used to create table rows
  • within a row, use <th> for header cells and <td> for regular cells (td = table data)
  • you can also use <caption> to add a caption to the whole table