Home > Article > Web Front-end > Basic knowledge of web page production (html) (2) Basic operations
1.1HTML title
The heading (Heading) is defined through tags such as 4a249f0d628e2318394fd9b75b4636b1 - 4e9ee319e0fa4abc21ff286eeb145ecc.
4a249f0d628e2318394fd9b75b4636b1 Defines the largest title. 4e9ee319e0fa4abc21ff286eeb145ecc Defines the smallest heading.
<html> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6> <p>请仅仅把标题标签用于标题文本。不要仅仅为了产生粗体文本而使用它们。请使用其它标签或 CSS 代替。</p> </body> </html>
1.2HTML Horizontal Line
231a563c997aa9e3e0ae614bd16728b0 tag creates a horizontal line in the HTML page. The
hr element can be used to separate content.
<html> <body> <p>hr 标签定义水平线:</p> <hr /> <p>这是段落。</p> <hr /> <p>这是段落。</p> <hr /> <p>这是段落。</p> </body> </html>
1.3HTML Comments
You can insert comments into the HTML code, so you can Improve its readability and make the code easier to understand. The browser ignores comments and does not display them.
The comment is written like this:
<html> <body> <!--这是一段注释。注释不会在浏览器中显示。--> <p>这是一段普通的段落。</p> </body> </html>
Comment: An exclamation point needs to be followed immediately after the opening bracket (the left bracket), but not before the closing bracket (the right bracket).
Tip: Proper use of comments can help with future code editing work.
2.1HTML Line Break
If you want to wrap (new line) without creating a new paragraph, please use < ;br /> Tags
<html> <body> <p>To break<br />lines<br />in a<br />paragraph,<br />use the br tag.</p> </body></html>
2.2HTML Output - Helpful Tips
We cannot determine the exact effect of the HTML being displayed. The size of the screen, as well as adjustments to the window, may lead to different results.
With HTML, you cannot change the output by adding extra spaces or line breaks to the HTML code.
When displaying the page, the browser will remove extra spaces and blank lines in the source code. All consecutive spaces or empty lines are counted as one space. Note that all consecutive empty lines (newlines) in HTML code are also displayed as a single space.
<html> <body> <h1>春晓</h1> <p> 春眠不觉晓, 处处闻啼鸟。 夜来风雨声, 花落知多少。 </p> <p>注意,浏览器忽略了源代码中的排版(省略了多余的空格和换行)。</p> </body> </html>
【Related recommendations】
1. Free html online video tutorial
3. php.cn original html5 video tutorial
The above is the detailed content of Basic knowledge of web page production (html) (2) Basic operations. For more information, please follow other related articles on the PHP Chinese website!