CLOSE

HTML Tags

HTML Tags give meaning to a page. They tell the web browser how to format and display the content inside. Most tags have two parts; an opening and a closing tag.

Structuring Your HTML With Tags

Most web pages will have a common structure. Below is the basic structure for a web page.

<!DOCTYPE html>
<html>
    <body>
        My First Web Page
    </body>
</html>
Expand

Add the above code to your file and save again. Refresh your web browser. You will notice the appareance has not changed. Tags are used to give meaning to what is inside. The tags used will not change the appearance.

The Code Explained

Above we have used a couple of tags to set up our HTML document structure. The <!DOCTYPE html> tag is used to tell the browser what version of HTML you're using. The most recent version is HTML5 and that is what this tag is telling the browser to use. It is very important to include this tag on each HTML page. The next tag is the <html> tag. This tag wraps everything else inside. Everything between the opening and closing html tag is the document. Lastly we have the <body> tag. Content wrapped in this tag will display in the browser.

Not all tags will have both opening and closing tags. Only tags that allow content inside will need a closing tag. This will be expanded on later in the tutorial.

Share This Tutorial

Link To This Tutorial

Tutorial URL
https://stepbystephtml.com/tutorial/15/html-beginner-tutorial

HTML Link

Help Us to Help You

This website and it's tutorials are only made possible with your support. Support money goes towards keeping our servers online.

Amount

Link to Us

Spread the word! Let people know about our tutorials by placing links on blogs, websites, forums and other places.

HTML Link

Copyright 2019 Step By Step HTML. All Rights reserved.