Computerhelp4all logo Articles AboutTopicsQuizzesComputer Questions & AnswersComputer Terms & DefinitionsActivitiesContact

What Is HTML?

What Is HTML

Date First Published: 18th July 2022

Topic: Web Design & Development

Subtopic: Web Development

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 4/10

Learn more about what HTML is in this article.

Stands for Hypertext Markup Language. HTML is the standard and most widely used markup language on the World Wide Web, used to achieve font, colour, graphics, and hyperlinks. HTML consists of hundreds of different elements and tags, all of which instruct the web browser on how to display content and load images and other elements. Every webpage on the Web is built using HTML.

HTML is used in combination with CSS (Cascading Style Sheets), used to define how HTML elements are displayed in a web browser, and JavaScript, a scripting language used to create interactive effects within web browsers, such as alert boxes. Anyone with a computer and a text editor, such as Notepad can create a HTML file. They can be displayed on local computers in a web browser without uploading them to a web server.

The W3C provides a free HTML validation service to validate HTML pages here. A HTML document can be uploaded, checked by URL, or directly inputted.

Note: Info Icon

In HTML, 'markup' refers to the tags assigned to elements of a text that define how the page should be displayed. 'Hypertext' refers to the hyperlinks that a HTML page may contain, allowing references to be created to other pages that the reader can immediately access.

What Does A HTML Document Look Like?

An example of a simple HTML document can be seen below.

<!DOCTYPE html> <html> <head> <title>Computerhelp4all.com</title> </head> <body> <h1>Type your heading here.</h1> <p>This is an example of a HTML page with paragraphs.</p> <p>Paragraph 2</p> <p>Paragraph 3</p> </body> </html>

The output of the HTML document is shown in the screenshot below.

HTML Document Output

In this example, the HTML elements used are:

  • <!DOCTYPE html> – All HTML documents must start with this. It is used to inform the browser as to which document type is expected.
  • <html> - Indicates the start of the HTML code. The ending tag </html> indicates the end of the tag.
  • <head> - This is a metadata container placed between the <html> and <body> tag. All the metadata of HTML documents, including the title, description, keywords, etc, are defined here.
  • <body> - This defines the body of the HTML document. In other words, it defines the main content. In this example, the main content only contains text.
  • <p> - This HTML element represents a paragraph. Before and after each <p> element, web browsers automatically add a single blank line.

For more information on how to create a HTML document, see this article.

A HTML tag consists of:

  • A start tag.
  • The content.
  • An end tag.
Note: Info Icon

Web browsers do not display the HTML tags, but use them to display content and other elements. In the screenshot below, only the content is displayed and none of the HTML tags are visible without clicking 'View Source'. Internet users will not see the HTML code since the web browser parses it in the background unless they view source.

File Extensions

HTML files can either end with the '.html' or '.htm' file extension. There is no difference between the two file extensions and both can be used based on personal preference. However, it is best to stick to one file extension and just use that throughout a website. Older versions of Windows, such as Microsoft DOS, Windows 3.x, Windows 95, Windows 98, and Windows NT do not support file extensions longer than three characters, which is why they used '.htm' instead of '.html'. The file extension '.html' is more common as most servers support four-letter file extensions.

Note: Info Icon

Even though dynamic webpages created by a scripting language, such as PHP, Perl, and Python show HTML in the source code, they have a different file extension, such as '.php', '.pl', or '.py'.

What Is XHTML?

XHTML stands for Extensible Hypertext Markup Language. It is an XML-based version of HTML that extends HTML and allows it to work with other data formats, such as XML. XHTML documents are parsed using standard XML parsers rather than a less strict HTML-specific parser.

What Is HTML5?

HTML5 is the most recent and updated version of HTML that was released in 2014 by the W3C recommendation. The aim of HTML5 was to improve the markup language with support for the latest multimedia and other new features. It added some new tags and attributes, allowing better support for dynamic elements activated using JavaScript. It is highly believed that there will be no HTML6 and that HTML5 is the final version of HTML. The current HTML5 will be updated with new features without version numbers.

HTML Versions and History

HTML has been used since the introduction of the World Wide Web as a method for web browsers to interpret and display webpages. In 1991, Tim Berners-Lee publically posted a description of HTML. The original design of HTML was quite simple and only included 18 tags. It adopted the tagging structure of SGML (Standard Generalised Markup Language). Since its introduction, a lot of updates have been seen from the W3C. A total of 140 HTML tags have been added across the versions, especially in HTML5. Semantic tags for components of a website, such as the header, footer, and navigation menu as well as audio and video elements, were added with HTML5.

HTML 1.0

This version of HTML was not officially released. It had support for basic elements, such as images, but no support for more complex HTML elements, such as styling, tables, fonts, and other features that control how content will be rendered in a web browser. Before the introduction of HTML 2.0, the W3C did not exist.

HTML 2.0

HTML 2.0 was introduced on 24th November 1995 and was defined in RFC 1866. In HTML 2.0, forms were developed. The table came as a HTML tag. A year before the release of HTML 2.0, the W3C was founded.

HTML 3.2

HTML 3.0 was the first version that was developed and standardised by the W3C on 14th January 1997. Due to W3C standard maintenance, this version of HTML was 3.2 instead of 3. HTML 3.2 dropped maths formulas and adopted most of Netscape's visual markup tags. A markup for mathematical formulas was not standardised until 14 months later in MathML (Mathematical Markup Language). Another feature that HTML 3.2 implemented was support for CSS.

HTML 4.0

HTML 4.01 was defined as a W3C Recommendation on 24TH December 1999. HTML 4.01 extended the support of CSS and allowed an external CSS file to be developed and linked in the HTML document.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.