Lets start our journey with HTML - Part 1

HTML stands for Hyper Text Markup Language. This language is used to create the skeleton of any website. It describes structure of any website. And helps to format the layout of the website.
It uses tags in its syntax. The <html> is the opening tag whereas </html> is the closing tag. Hence "/" sign indicates the closing sign. HTML consists of a series of elements. These elements tell the browser how to display the content.
What is an HTML Element?
An HTML element is defined by a start tag, some content, and an end tag:
<tagname> Content goes here... </tagname>
Examples of some HTML elements:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
| Start tag | Element content | End tag |
| <h1> | My First Heading | </h1> |
| <p> | My first paragraph. | </p> |
Boilerplate Code:
This is the standard format or the skeleton of the HTML file. Every language has its own skeleton which means the code that we need to write for the implication of that particular language.
<!Doctype html> ---> specifies this is an HTML 5 file
<head> ---> Contains meta data
<title> ---> contains title
</title>
</head>
<body> ---> body of page
<h1> </h1> ---> heading tag
<p> </p> ---> paragraph tag
</body>
</html>
We use metatexts in the "<head>" tag, metatexts are the descriptions.
A tag is like a container for either content or other HTML tags.
Some HTML tags have no content. These are called empty tags. Eg: <br> tag. It is used to break the paragraph or other HTML tags. It does not need a closing tag like other HTML tags.
.html is the extension for HTML files.
You can use the "Inspect Element" or "View Page Source" option from browser to look into the website's HTML code.
Comments: These are the lines that are used to mark text which should not be parsed. They can help document the source code. It can be applied by using " ctrl + /".
HTML is a case-sensitive language.
Basic HTML tags
HTML headings: HTML headings are defined with the
<h1>to<h6>tags.<h1>defines the most important heading.<h6>defines the least important heading.
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
- HTML Paragraphs: HTML paragraphs are defined with the
<p>tag:
<p>This is a paragraph.</p>
- HTML Links: HTML links are defined with the
<a>tag.
<a href="https://www.w3schools.com">This is a link</a>
Nested elements:
HTML elements can be nested (this means that elements can contain other elements).
The following example contains four HTML elements (<html>, <body>, <h1> and <p>):
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Explanation:
Here there is <html> tag which defines the whole HTML document. Inside <html> tag there is <body> tag in it.
<body> tag defines the document's body. In <body> tag, the two elements i.e. <h1> and <p> are nested.
