Introduction to Html5
What is Html?
Html stands for Hypertext Markup language, it is used in defining the structure of web pages. In simple words, it is the skeleton of any website, with the help of HTML, developers can add different types of media (images, audio, video), heading, lists, tables, and forms to the web page.
It uses predefined tags and elements to manipulate content on the web page.
The html file is saved with the extension ".html" e.g:- "index.html"
Now a little bit of theory
InHTML5 is the latest version of HTML with new handy features and updates which makes our work easy.
In the journey of Web development, HTML is the basic thing that you need to learn.
It is not a programming language, we cannot build logics in HTML like Java, javascript etc.
We will not go deeper into the theory, as a developer we should more focus on logic and practical, understanding of language.
Structure of HTML5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
<!DOCTYPE html>:- It defines to the browser that we are using HTML5.
<html>:- This is the root of the HTML document, the whole code of HTML is written inside html tag. it has a closing tag also at the end of the document.
Note:- Html document has two parts <head> </head> and <body> </body>
<head>:-All the essential information for the browser is written in the head tag, you can consider it to be the brain of the HTML document.
The content of the head tag does not display on the web pages.
All links, title of the web page and meta information(about meta info we'll learn about later) etc are written in the head tag.
<body>:- The actual code of the web page is written in the body tag that will be displayed on the web page.
we use different types of tags to write the content of the web page, according to their use cases. For example, heading tag to write headings (<h1> </h>) , paragraph tag to write paragraph <p></p>
we will learn about tags and elements in the next blog.
Demonstration
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>This is the heading</h1>
<p>Thank you for reading my blog if you really liked it , Do like and comments</p>
</body>
</html>
Output
Note:
you don't need to create a basic setup like html tag, head tag, body tag, etc. You can generate boilerplate code just by pressing "!" in vs code. first, make an HTML file e.g index.html.
Boilerplate code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
Thank you so much for reading it completely, this is my first blog and for any feedback you can comment.
Subscribe to my newsletter
Read articles from Bharat Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Bharat Singh
Bharat Singh
I am an engineering student , currently learning web development .