Heading
Headings are defined with the <h1>
to <h6>
tags. <h1>
defines the most important heading. <h6>
defines the least important heading.
Use HTML headings for headings only. Don't use headings to make text BIG or bold. Search engines use your headings to index the structure and content of your web pages. Users skim your pages by its headings. It is important to use headings to show the document structure. h1 headings should be main headings, followed by h2 headings, then the less important h3, and so on.
Horizontal Rules
The <hr>
tag creates a horizontal line in an HTML page. The hr element can be used to separate content.
"head" Element
The HTML <head>
element has nothing to do with HTML headings. The HTML <head>
element contains meta data. Meta data are not displayed. The HTML <head>
element is placed between the <html>
tag and the <body>
tag:
<!DOCTYPE html>
<html>
<head>
<title>My First HTML</title>
<meta charset="UTF-8">
</head>
<body>
"title" Element
The HTML title
element is meta data. It defines the HTML document's title. The title will not be displayed in the document, but might be displayed in the browser tab.
"meta" Element
The HTML <meta>
element is also meta data. It can be used to define the character set, and other information about the HTML document.
More Meta Elements
The HTML <style>
element is used to define internal CSS style sheets.
The HTML <link>
element is used to define external CSS style sheets.
Summary
Tag | Description |
---|---|
<html> |
Defines an HTML document |
<body> |
Defines the document's body |
<head> |
Defines the document's head element |
<h1> to<h6> |
Defines HTML headings |
<hr> |
Defines a horizontal line |