HTML was originally founded by Tim Berners-Lee in the year 1991. Although the initial version of HTML was HTML 1.0, the version of HTML that was considered to be standard was HTML 2.0. HTML consists of various components which are regarded as tags and elements. These entities have been explained below.
What are HTML Tags
HTML tags wrap content such as text, images, etc inside them. These tags represent the begining and ending of an HTML element. There are tags for each element such as tags for generating headings, paragraphs, adding images, etc..
What are HTML Elements
An HTML element is a combination of an opening tag, some content, and a closing tag. However, not all elements have this combination. Some of the HTML elements are regarded as empty because these do not have a closing tag and the content is provided to these elements using attributes that are specified in the opening tag.
For instance, the <img> element that is used to add images to web pages is an empty element that has no ending tag and the image is provided to it using its src attribute. Here is a visual representation of HTML elements and tags.
What is the structure of an HTML Page
The HTML page consists of two sections which are the head section, and the body section. Elements are wrapped inside these sections. The diagram below demonstrates in detail the structure of an HTML page.
Now that we have an understanding of the structure of an HTML page let’s have a look at its example
How to create a basic HTML page
Here is how you generate a basic HTML page.
In the above code, we are first of all specifying the version of the HTML then in the <head> section we are stating the title of the page in the <title> tag. Afterward, in the <body> section we are specifying two elements which are <h1>, and <p>. We are then placing some text inside the starting and closing tags of these elements.
Output
A basic HTML page was generated.
Conclusion
HTML short for HyperText Markup Language is a markup language that is used to develop static web pages and defines the structure of a web page which means that the elements appear on a website in the sequence with which you place them in an HTML file. HTML consists of various components which are regarded as tags and elements. HTML tags wrap content such as text, images, etc inside them and represent the start and end of an HTML element, whereas, HTML elements are combinations of opening tags, some content, and closing tags.