HTML tags

You need to be familiar with how Hypertext Markup Language (HTML) is used to create web pages. The latest version of HTML is called HTML5.

HTML5 files should always start with the following line of code:

<!DOCTYPE html>

This lets the browser software know the version of HTML it is about to find in the file. It should come before the opening <html> tag. Tags are then used to define different sections of HTML code and add content.

Tags start like this <tagname> and usually end like this </tagname>, although some can self-close. There are four critical tags that are used to create webpages.


The opening and closing tags of an HTML file. Tells the browser the rest of the document contains HTML tags.


These tags include all information about the page itself as well as links to JavaScript and CSS files. Metadata is entered here that can be indexed by search engines.


The text included between the opening and closing ˂title˃ and ˂/title˃ tags is the title of the webpage. The title appears on browser tabs, as a page title. It is also what appears as the title of the webpage on search result pages.


Content within the ˂body˃…˂/body˃ tags is the content that users will see on the page.

Here is the structure of a basic HTML file using the tags described above:

<!DOCTYPE html><html><head><title>Title of webpage</title></head>


(The content of the webpage would be added here using relevant elements)


To see how a web page has been coded, use the 'View Source' option in the browser. HTML can look complicated at first, but by learning the basics you should be able to spot elements that you understand.