Skip to main content

What is HTML?

Hypertext Markup Language (HTML) is a markup language that is used for defining the layout of a Web page. You use HTML to provide structure to your content so they are organised in a way that can be understood by a Web browser. If written correctly, HTML document can be parsed by a Web browser alongside with other files such as Cascading Style Sheet (CSS) and client-side scripts (e.g JavaScript files) and display the content to the user.

As a language, HTML does have rules in form of syntax and grammar. You can learn about those rules by reading the related document about HTML structure and elements in this site. For example, most of HTML tags are written in pair, i.e a tag may have an opening and closing element. Consequently, some browsers might not display the content correctly if they find a HTML tag that is not properly closed.

It is important to know that HTML is not a programming language. It is only used to define structure of a content in a Web page. HTML does not have the capability to represent a control flow that commonly found in an actual programming language such as Python and Java. You will learn more about this in Language Theory & Automata course. But, if you are really curious, try to look up the definition of a Turing-complete language and see whether HTML fits the criteria of a Turing-complete language.

Note: If you are already familiar with HTML, you can proceed to the next section or try to do some practical exercises.