Posts in current category
May 02, 2021 11:06 HTML
In HTML documents, the title is important.
HTML titles can be used to render document structures, and well-set titles help users navigate your web pages.
The title (Heading) is defined by the hashtags
Define the largest title. Define the smallest title.
Note: The browser automatically adds empty lines before and after the title.
Note: By default, HTML automatically adds an extra empty line before and after a block-level element, such as a paragraph, before and after a title element.
Make sure that the HTML Title label is used only for titles. Don't use a title just to generate bold or large text.
Search engines use titles to index the structure and content of your pages.
Because users can quickly browse your web pages through a title, it is important to present the document structure with a title.
h1 should be used as the main title (most important), followed by h2 (secondaryly important), followed by h3, and so on.
You can learn to edit the hashtags in the hands-on exercises!
The label creates a horizontal line in the HTML page.
The hr element can be used to separate content, using the horizontal lines generated by the element to visually separate the document into sections.
Comments can be inserted into HTML code to improve their readability and make the code easier to understand. The browser ignores the comments and does not display them.
HTML comments can be easily used to help web designers remind them of program-related information.
The comments are written as follows:
Note: After the opening brackets (the parenthesis on the left) you need to follow an exclamation mark, you don't need to end the parenthesis (the parenthesis on the right), and using the comments reasonably can be helpful for future code editing.
You can learn HTML comment statements in The Practice!
Have you ever looked at some web pages and marveled at how it works?
If you want to find the mystery, just right-click and select View Source File (IE) or View Page Source Code, as other browsers do. Doing so opens a window that contains the page's HTML code.
How to display the title in an HTML document.
How to insert comments in HTML source code.
How to insert a horizontal line.
W3CSchool's label reference manual provides more information about these titles and their properties.
You'll learn more about HTML tags and properties in the sections below this tutorial.
|<html>||定义 HTML 文档|
|<h1> - <h6>||定义 HTML 标题|