HTML Reference Page                             

HTML Reference Page

     
     

At one point in your life, you've probably accidentally pressed on the F12 key on your keyboard. Then you see a bunch of gibberish appear:

     

What the heck does all of that mean?

     

Let's talk about that.

     

Tip:    Click on the name of the element to skip to a more in-depth explanation.   

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

     

Elements

     
     
     
        

HTML Element

     
        

The HTML element tells the browser that the document is a HTML document.   

    Location: Right after the <!doctype html> tag. The very last line in a HTML document.

        

This tag represents the root of a HTML doc. It should contain everything except for the <!doctype html> tag.    
Basically, this should be your second line of code, the first being your <!doctype html> tag.

        

Syntax

        

<html>[ALMSOT EVEYRTHING!]</html>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

             
        

The head element is a container for metadata (data about data).   

    Location: Between the <html> and <body> tags.

        

Metadata is code that isn't explicitly displayed.    
It will alter your web page but the only way to really see the code itself is to view the page's source code.    
Examples of metadata include (but are not limited to):

                 

Syntax

        

<head>[moitadoita!]</head>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

        

Title Element

     
        

The title element defines the title of the document.   

    Location: Inside the <head> tag.

        

It is required in all HTML documents and essentially names your document.

        

Syntax

        

<title>[doc tootle!]</title>

        

Example

        

        

Display

        

See "Example."

        

W3 Schools Link

     
     

     

Body Element

     
        

The body element defines the body of the document. There is only one body per HTML page.   

    Location: Right after the </head> tag.

        

It contains all of the visible elements of a HTML web page. Components you can add in the body include hyperlinks, text/paragraphs, tables, lists, pictures, etc.

        

Syntax

        

<body>[stufff!]</body>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

        

Headings Element

     
        

The headings element are used by search engines to index the structure/content of your web page and users will often skim over your web page by looking at the headings.   

    Location: Anywhere you want after the <body> tag. Does not have to come after <p>.

        

Headings are defined by <h1> through <h6>. The most important heading should be <h1>, followed by <h2>, and so forth.

        

Syntax

        

<h(#)>[yor headoings!]</h(#)>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

       

Paragraph Element

     
        

The paragraph element is used to show words.   

    Location: Anywhere you want after the <body> tag.

        

Basically just used to write things. Extra spaces in between lines will be ignored.

        

Syntax

        

<p>[werds!]</p>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

      

Break Element

     
        

The break element acts as the "enter"/new line key in a (ex. MS Word) document.   

    Location: Anywhere after <body>

        

In HTML, computers ignore extra lines in the source code.    
    You can add all sorts of lines in the code but none of them will show up in the actual page.    
    That's where the break element comes in.   
    The break element will add a line to separate two paragraphs or other elements. You can add as many as you like and the computer will acknowledge them all.   
    The break element does not require an end tag.

        

Syntax

        

<br>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

          

Line Element

     
        

The line element defines a break in a HTML page.   

    Location: Anywhere after the <body> tag.

        

It basically draws a line across your web page and usually signifies a thematic change/a change in topics. You can use it to separate content.

        

Syntax

        

<hr>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

        

Comment Element

     
        

The comment element is used to insert whatever you want in a source code without it affecting the display of the web page.   

    Location: (?) Most likely anywhere after the <html> tag.

        

Comments are great for reminders and notifications/signals. They are not visible unless you view the source code.    
    Comments are also useful for when you're trying to debug HTML.

        

Syntax

        

<!--[snarkee commont!]-->

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

              
        

The hyperlink element allows users to jump from one document/page to another.   

    Location: Anywhere after the <body> tag.

        

Though more commonly known as links, these are called hyperlinks and are not to be confused with the link tag in the head element.

        

Syntax

        

<a href=[leenk!]>[leenk namee! but! is opshunel. if noh leenk namee, actual leenk well shoe upp]</a>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

        

Image Element

     
        

The image element displays images locally or from anywhere on the web (assuming the image exists).   

    Location: Anywhere after the <body> tag but can go after a paragraph tag.

        

With the image tag, you can display images either from a file or directly from the web.

        

Syntax

        

<img src="[leenk toh imagee!]">

        

Example

        

*This example is from a local file so it is not derived from a link.

        

        

Display

        

        

W3 Schools Link

     
     

     

List Element

     
        

The list element allows you to create either a numbered list or a bullet list.   

    Location: Anywhere after the <body> tag.

        

Lists are used to list or number items in any order you want. ol is an ordered list, which means it is numbered. ul is an unordered list, which means it is a bullet list.

        

Syntax

        

<u/ol><li>[leest iteem namee, add as many as yoo want]</li></u/ol>

        

Example

        

        

Display

        

        

W3 Schools Link

     
     

                 

Table Element

     
        

The table tag defines a HTML table. Each table row is defined with a <tr> tag. A table header is defined with a <th> tag. A table data/cell is defined with a <td> tag.   

    Location: Anywhere after the <body> tag.

        

Table headings are bold and centered. The <td> tags contain the data in the table.    
    You can add all sorts of things in it, like images, lists, and more tables (table-ception!1!!).

        

Syntax

        

<table>   
    <tr>   
    <th>   
[da things runnin acroos the top of da tooble dat designate the columns, add as many as you like, ending the tag for each column]   
    </th>   
    </tr>   
    <tr><td>   
[the stuff in the table that will go in the first row, add as many as you like, each new tag added is the next row after the previous]   
</td>   
</tr>   
</table>

        

Example

        

        

Display

        

        

W3 Schools Link