HTML – New Document

Let’s get started on some of the basic rules and elements you will come across when starting your first HTML document.  Your HTML document should always start with a document type declaration. This is a tag which lets the web browser know which flavor of HTML you intend on using. For this example we will use the HTML5 declaration tag which looks like this:

<!DOCTYPE html>

Once the DOCTYPE is in place, you are officially ready to start writing your HTML code. First order of business is to tell your web browser where your HTML code begins and where it ends. To do this you will want to use the HTML open and closing tags which look like this:



Once you have your HTML tags in place you will also need to add the BODY tags. The BODY element is the section of your code which will display the visible content onto the page, such as images, links, tables, text and so forth.  It would look something like this:

        This text will be visible on your page.

You may notice from the example above, how we have embedded the BODY element inside the HTML element. This neatly organized structure allows the web browser to identify elements in the code as well as gives us the ability to compartmentalize our code which also makes for  easy reading.


Leave a Reply

Your email address will not be published. Required fields are marked *