HTML basic summary recommendation (title)

HTML basic summary recommendation (title)

HTML: Title

Heading is defined by tags such as <h1> - <h6>.

<h1> defines the largest heading. <h6> defines the smallest heading.
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>

Tip: Browsers will automatically add blank lines before and after the title. h1 is used as the main heading (the most important), followed by h2 (the next most important), followed by h3, and so on. Tip: By default, HTML automatically adds an extra blank line before and after block-level elements, such as paragraphs and headings. The align attribute of <h1> - <h6> is deprecated in HTML4/5. Please use CSS instead. Title supports event attributes and global attributes

Set title alignment:

CSS syntax: <h1 style="text-align:right">

Method 1:

XML/HTML CodeCopy content to clipboard
  1. <!DOCTYPE html >   
  2. < html >   
  3. < body >   
  4. < h1   style = "text-align:center" > This is heading 1 </ h1 >   
  5. < h2   style = "text-align:left" > This is heading 2 </ h2 >   
  6. < h3   style = "text-align:right" > This is heading 3 </ h3 >   
  7. < h4   style = "text-align:justify" > This is heading 4 </ h4 >   
  8. </ body >   
  9. </ html >   

Method 2:

XML/HTML CodeCopy content to clipboard
  1. <!DOCTYPE html >   
  2. < html >   
  3. < head >   
  4. < style >   
  5. h1 {text-align:center}
  6. h2 {text-align:left}
  7. h3 {text-align:right}
  8. </ style >   
  9. </ head >   
  10.   
  11. < body >   
  12. < h1 > This is heading 1 </ h1 >   
  13. < h2 > This is heading 2 </ h2 >   
  14. < h3 > This is heading 3 </ h3 >   
  15. </ body >   
  16. </ html >   
屬性值 描述
left 左對齊標題(默認值)。
right 右對齊標題。
center 居中對齊標題。
justify 標題有合理的邊距。

HTML: Horizontal Rule

The <hr /> tag creates a horizontal rule in an HTML page.

The hr element can be used to separate content.

<p>This is a paragraph</p>
<hr />
<p>This is a paragraph</p>
<hr />

<p>This is a paragraph</p>Tip: Using horizontal rules (<hr> tags) to separate sections in an article is one way (but not the only way). HTML5 does not support the <hr> align attribute. Please use CSS instead.

The align attribute of the <hr> element is deprecated in HTML 4.01.

The align attribute specifies the alignment of the horizontal line.

Note: The align attribute has no effect unless the width attribute is set to less than 100%.

CSS syntax (IE and Opera): <hr style="text-align:right">

CSS syntax (Firefox, Chrome, and Safari): <hr style="margin-right:0">

CSS syntax (cross-browser): <hr style="text-align:right;margin-right:0">

屬性 描述 css語法格式 <h style=width:"50%"> 
align left
center
right
HTML5 不支持。HTML 4.01 已廢棄。 規定 <hr> 元素的對齊方式
noshade noshade HTML5 不支持。HTML 4.01 已廢棄。 規定 <hr> 元素的顏色呈現為純色。
size pixels HTML5 不支持。HTML 4.01 已廢棄。 規定 <hr> 元素的高度。
width pixels
%
HTML5 不支持。HTML 4.01 已廢棄。 規定 <hr> 元素的寬度。
XML/HTML CodeCopy content to clipboard
  1. <!DOCTYPE html >   
  2. < html >   
  3. < body >   
  4. < p > This is some text. This is some text. This is some text. </ p >   
  5. < hr   style = "width:50%;text-align:left;margin-left:0" >   
  6. < p > This is some text. This is some text. This is some text. </ p >   
  7. </ body >   
  8. </ html >   

HTML: Comments

Comments can be inserted into HTML code to improve its readability and make the code easier to understand. Browsers ignore comments and do not display them.

The comment reads:

<!-- This is a comment -->

Note: The two forward slashes (//) at the end of the command line are JavaScript comment symbols. This ensures that JavaScript does not execute within the --> tag.

Besides their very obvious role in source documents, many Web servers also make use of comments to implement features specific to document server software. These servers can scan documents, find specific character sequences in traditional HTML/XHTML comments, and then take appropriate actions based on the commands embedded in the comments. These actions may be as simple as including text from other files (so-called server-inside includes), or as complex as executing other commands to dynamically generate the content of the document.

The above HTML basic summary recommendation (title) is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

Original URL: http://www.cnblogs.com/sxtywjx/p/5665044.html

<<:  A detailed introduction to the netstat command in Linux

>>:  CSS implements various loading effects with parsing process

Recommend

Learn javascript iterator

Table of contents Introduction What does an itera...

When to use table and when to use CSS (experience sharing)

The main text page of TW used to have a width of 8...

W3C Tutorial (11): W3C DOM Activities

The Document Object Model (DOM) is a platform, a ...

Analyze the method of prometheus+grafana monitoring nginx

Table of contents 1. Download 2. Install nginx an...

A brief analysis of how to upgrade PHP 5.4 to 5.6 in CentOS 7

1. Check the PHP version after entering the termi...

CentOS7 deploys version 19 of docker (simple, you can follow it)

1. Install dependency packages [root@localhost ~]...

How to set underline in HTML? How to underline text in HTML

Underlining in HTML used to be a matter of enclos...

Vue implements card flip carousel display

Vue card flip carousel display, while switching d...

Detailed explanation of how a SQL statement is executed in MySQL

Overview I have recently started learning MySQL r...

Summary of CSS sibling element floating analysis

float:left/right/none; 1. Same level floating (1)...

How to recover files accidentally deleted by rm in Linux environment

Table of contents Preface Is there any hope after...

Web Design: Web Music Implementation Techniques

<br />When inserting music into a web page, ...

How to install MySQL 5.7.29 with one click using shell script

This article refers to the work of 51CTO blog aut...