DEV Community

Cover image for HTML Basic Structure
Sagor cnits
Sagor cnits

Posted on

HTML Basic Structure

Hope everyone is well.

Today's topic: 6 topics of HTML Basic Structure.

1. What does <!DOCTYPE html> do in our web pages?

<!DOCTYPE html> is a doctype declaration placed at the beginning of an HTML document. It tells the browser which HTML version the document is written in. HTML5 is commonly used in modern web development. But currently HTML5 is widely used and HTML5 doctype is very simple.

2. What does <html lang="en"> do on our web pages?

The main tag of the HTML document. Here** lang="en"** indicates that this HTML document is written in English. This is helpful for search engines and screen readers, as they understand what language the content is in.

3. What does the <head> tag do in our web pages?

The <head> tag is a part of an HTML document that contains important information that is important to browsers and search engines.

4. What does the <title> tag do in our web pages?

The <title> tag defines the title of the HTML document. This title is displayed in the title bar of the browser tab or window. Also, it is used as a title when saving the page as a bookmark and is also displayed in search engine results. The <title> tag must always be inside the <head> tag, and each HTML document can contain only one <title> tag. It is also very important for search engine optimization.

5. What does the <meta charset="UTF-8"> tag do in our web pages?

<meta charset="UTF-8"> is a meta tag that defines the character set of the HTML document. It tells the browser how the characters used in the document are encoded. UTF-8 is the most popular character set, capable of encoding almost all types of characters and symbols. It is commonly used for all languages, as it can encode multilingual text.

6. What does the <body> tag do in our web page?

The <body> tag contains the HTML body content. It is used for the visible part of the document that is displayed in the browser. Whatever is written inside the <body> tag, users see in their browser. The <body> tag always comes inside the <html> tag and after the<head>tag. This is a very important part of the HTML document, as it establishes direct communication with the user.

These 6 things are very important for our web page so they must be understood well. This is a small topic we have discussed today, I hope it will give you some benefit, inshallah.

subscribe YouTube : https://www.youtube.com/@OnnorokomProgramming

Contact me : https://sagor-hossain.vercel.app/

Top comments (0)