What is a heading? – Title tags in HTML – Learn HTML


LinkVietVip.Com là một website miễn phí, nơi mà bạn có thể rút gọn liên kết miễn phí và kiếm thu nhập từ việc chia sẻ liên kết rút gọn đó của mình.
Trang Download, Tải về,Site Tải Xuống, Upload, Mở, Xem, Open, Load, Tiếp Tục,Chơi, Chơi Game, Continue, Reading, Xem tiếp, Xem thêm, Chuyển hướng tới địa chỉ bên ngoài vui lòng xem bên dưới.

Headings are important in an HTML page. Heading apart from emphasizing the title of a piece of content and beautifying the page is also a very important factor for SEO. In this article we will learn together about Headings in HTML, How to view the source code of a web page and some other title tags.

What are headings in HTML?

What is a heading?

  • A heading is a name, title for a paragraph or several paragraphs, indicating the brief and prominent content of that paragraph.
  • Headings are often used to name a large part of an article.

Headings in HTML

Headings in html are defined by the tags <h1> to <h6>

<h1> is used to define the most important heading in the page. <h6> is used to define less important headings in the page. That is, the priority of the heading decreases from h1 to h6.

Paste the following code into the editor and run to better understand:

<!DOCTYPE html>
<html>
<body>
 
<h1>Đây là tiêu đề 1</h1>
<h2>Đây là tiêu đề 2</h2>
<h3>Đây là tiêu đề 3</h3>
<h4>Đây là tiêu đề 4</h4>
<h5>Đây là tiêu đề 5</h5>
<h6>Đây là tiêu đề 6</h6>
 
</body>
</html>

Note:  Browsers will automatically add spaces above and below each heading.

The importance of the heading

Only use tags h1 through h6 for headings. Do not use heading tags to make the words  TO  or  bold .

Search engines will use headings to highlight the structure and content of your website.

Users will read and define your articles more easily through headings, so it’s important to use headings to display page structure.

The h1 tag is used to mark the main heading, then the h2, h3 … tags depend on the importance of the heading.

Horizontal line <hr>

Use the <hr> tag   to create horizontal lines in HTML pages.

The hr tag   separates between content:

<!DOCTYPE html>
<html>
<body>
 
<p>Thẻ hr dùng để tạo một dòng kẻ ngang tách các nội dung:</p>
               <hr>
<p>Đây là một đoạn văn bản.</p>
               <hr>
<p>Đây là một đoạn văn bản.</p>
               <hr>
<p>Đây là một đoạn văn bản.</p>
 
</body>
</html>

The <head> tag in HTML

The <head> tag has nothing to do with the headings in the HTML.

The <head> tag is used to store additional data and is not displayed on the page.

The <head> tag is placed within the <html> tag and on the <body> tag:

<!DOCTYPE html>
<html>
 
<head>
<title>Trang web đầu tiên của tôi</title>
<meta charset="UTF-8">
</head>
 
<body>
 
<p>Thẻ head dùng để chứa các siêu dữ liệu (meta data).</p>
 
<p>Siêu dữ liệu là những dữ liệu bổ sung cho trang HTML.</p>
 
</body>
</html>

The HTML <title> tag

The <title> tag is used to set and display the title of an HTML page.

This title will not display in the content of the page but will be displayed in the browser title bar.

Run the following example to better understand:

<!DOCTYPE html>
<html>

<head>
<title>Đây là tiêu đề của trang</title>
<meta charset="UTF-8">
</head>
 
<body>

</body>
</html>

The <meta> tag in HTML

The <meta> tag (Data Tag) is used to define character codes and other information for an HTML page. The <meta> tag is used inside the <head> tag

Other data cards

In this lesson on HTML decoration you will learn more about tags:

The <style> tag is used to define CSS styles on the page.

The <link> tag is used to link to a CSS file in a certain directory or outside a webpage.

How to view a website’s source code

Have you ever seen a site so beautiful and wondered “Hey! How can they do that? ”

Very simply, right-click an empty space on the page and select “View Page Source” (in Chrome) or “View Source” (in IE), or similar sentences in other browsers. The browser will then open a new window (or tab) containing the HTML code of the page.

Summary:

In this article we have learned how to use the effect of some tags:

CardDescribe
<html>HTML page definition
<body>HTML page content
<head>Additional information for HTML pages
<h1> to <h6>Create headings
<hr>Create horizontal lines
<meta>Define character codes and other information
<title>Display the page title at the top of the browser

And how to view the source code of a website you want.

If you have any questions or suggestions for this article, feel free to leave me a comment below. I wish you good learning with HTML Online ^^.



Hãy bình luận đầu tiên

Để lại một phản hồi

Thư điện tử của bạn sẽ không được hiện thị công khai.


*