HTML

In this lesson, we'll learn the basics of HTML! By the end of this lesson, you should be able to comprehend and write basic HTML.

Introduction #

HTML (HyperText Markup Language) is not a programming language. It is a markup language. True programming languages have the ability to describe logic. HTML, however, is used to display and format parts of a webpage. It is strictly presentational.

Tag syntax #

HTML marks up content with HTML ‘tags’. HTML tags are the basic building blocks of all web pages. Essentially, they format the way that information and text is displayed. They put the content into categories (called elements!) such as ‘heading’, ‘paragraph’, and ‘table’. A basic HTML tag consists of a name enclosed within ‘angle brackets’ i.e., less than and greater than symbols. Also, these tags usually come in pairs of opening and closing tags. The closing tag is the same as the opening tag except that the closing tag has a forward slash after the less-than symbol. Have a look at the example below.

<tagname> content </tagname>

Some tags are ‘self-closing’ which means that they don’t require a closing tag. For example,

<selfclosing/> content

The diagram below shows an example of a labeled HTML element.