First and foremost, it is important to take a note to the point that HTML is a markup language and it is not considered a proper programming language. This is because it was not designed for programming purpose back in the day. HTML was developed and released with the sole of premise of communicating over the internet in some form of standard document theme.
Suppose, one wants to share a document on a particular website which is hosted somewhere on the globe and that person writes that document in Microsoft Word but the user who will reads the document uses a browser which can properly render a web page which is written in notepad. In this case, that particular page is likely to not get rendered properly on the user's system. To counter this very problem, the advent of HTML and the whole concept of standardisation of web document came into place.
How to install HTML?
HTML is something that comes packed with browsers by default and it does not need to get separately installed on the system. The thing one needs to get installed is the web browser which is the environment in which HTML gets rendered. Whatever operating system one is using, the operating system also comes with some default browser like edge for Windows, safari for Mac etc.
How one can write HTML?
It is very easy to write HTML documents on your computer. The most simplistic way is to just open the notepad on your system and write some HTML inside that document. Once done with writing the HTML, save that particular file with .html extension. By default, your operating system will open that file in the default browser.
That was quite simple. However, how one can know how and write in that particular document?
How to write basic HTML pages?
In order to write very basic HTML documents, one must understand the concept of a markup. Markup is a very old technique usually associated with content writing and publication in which editors, while reviewing the content, specify, through the use of some symbols or explicit text, what content should be presented in what form in a particular document. This way, the document will have some visual hierarchy in the readers' minds.
To further elaborate the above statement, the markup is a technique in which it is specified in the document how to present parts of text that will look distinguished and logical in readers' minds. Like, what should be the main heading of the page, what should be the regular text, what should be secondary headings, what should be the regular bold or italic text and etc, etc. When this concept is taken into the computer environment, this markup is called markup language.
How can we set markup in HTML documents?
In order to define markup in an HTML document, all we have to do is to wrap whatever content you have inside the pre-defined tags. Consider them as identifiers where we tell computer / browsers about what piece of content is a heading, what is a paragraph and etc. When a piece on content is wrapped around with certain particular tag, in HTML that portion is known as an HTML element like a heading element or a paragraph element etc.
It can be established from the above that in order to markup documents in computer, one has to utilise the power of markup language i.e. HTML (if the purpose is mainly to write pages for web browsers). In order to use HTML, one needs to write content in inside some pre-defined tags which will ultimately result in a particular HTML element ("element"). Let's have a look at below examples of using tags which will result in an element.
In order to write some heading on a page,
1<h1>This is a heading element which is wrapped around heading tags</h1> 2
In order to write some paragraphs on a page,
1<p>This is a paragraph element which is wrapped around paragraph tags</p> 2
As can be seen from the above examples, in every element, there is an opening tag and a closing tag. The difference between the two simply "/" - forward slash just before the name of the closing tag. Further, each element's tag starts with a less that sign or opening angle bracket and closes with a greater that sign or closing angle bracket and inside the those brackets, is the particular name of the tag, except that in the case of closing tag that name is followed by the forward slash.
However, contrary to above, one might want to show some non-typography data on a particular document like images. In that case, the element usually does consist of an opening and a closing tag but rather a self-closing tag. Have a look at the below example:
1<img src="http://www.someurl.com" alt="Alternative Text" /> 2
Conclusion
The points to remember mentioned in this post are as follows:
- HTML stands for Hyper-Text Markup Language.
- It is the standard markup language understandable by browsers to render human-readable content on web pages.
- HTML documents need to be saved with .html extension at the end of a file name.
- HTML document consists of various HTML elements.
- Each HTML element consists of an opening and a closing tag and the content is written in between those tags.
- HTML tags that are not related to typography are usually self-closing tags.