Introduction to HTML
In this lesson we get introduced to the HTML language that is used to create the content and structure of websites.
HTML stands for Hyper Text Markup Language. It is the standard markup language used for creating web pages.
HTML codes the structure of a web page by using a series of HTML elements. These elements tell the web browser how to display the content of the web page. For example using HTML we can tell the web browser if something is a heading, or if it some regular text, or if it's an image, or a table, or a link etc.
Each web page on the internet will have HTML code behind it that tells the web browser how to display the content.
Although web pages can display many different things, every web page will always have at least the following:
<!DOCTYPE html>that appears as the first piece of HTML code. This defines that this document is an HTML document.
<html>element is the root element of a web page.
<head>element contains information about the web page.
<title>element contains the title for the web page (this is used to display the title in the web page's tab).
<body>element contains all the content that will be displayed on the web page such as headings, text, images, videos, links etc.
A HTML element has a start tag, some content, and an end tag. Here are some examples:
|Start Tag||Content||End Tag|
<br>'break' element). These elements are called empty elements and do not have an end tag.
A web browser is an app that displays websites. Some examples of web browsers are:
- Mozilla Firefox
- Google Chrome
- Microsoft Internet Explorer
- Apple Safari
These web browsers take the HTML code and display the web page using the HTML code as the instructions on how to display the web page.
Although web browsers use all the HTML code that is written for a web page, they only display the code that is inside the
Let's write some HTML code!
Type (or copy and paste) the following code into the box below. This is the basic HTML code for the structure of a web page.
After you have entered the code, click on 'Run Code'. You will notice that nothing is displayed! This is because we haven't put anything inside the
This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.