HTML 文本格式化

HTML 格式化标签 HTML Formatting Elements

HTML格式,如字体格式(粗体、斜体、下划线、删除线、上标、下标、高亮标记等)。
In the previous chapter, you learned about the HTML style attribute.
HTML also defines special elements for defining text with a special meaning.
HTML uses elements like and for formatting output, like bold or italic text.
Formatting elements were designed to display special types of text:

  • - Bold text定义粗体文本 -->The HTML element defines bold text, without any extra importance.
    This text is bold

  • - Important text 定义加重语气 --> The HTML element defines strong text, with added semantic "strong" importance.
    This text is strong

  • - Italic text 定义斜体字 --> the HTML element defines italic text, without any extra importance.
    This text is italic

  • - Emphasized text 定义着重文字 --> The HTML element defines emphasized text, with added semantic importance.
    This text is emphasized

Note: Browsers display as , and as . However, there is a difference in the meaning of these tags: and defines bold and italic text, but and means that the text is "important".

  • - Marked text 定义高亮字 --> The HTML element defines marked or highlighted text:

    HTML Marked Formatting

  • - Small text 定义小号字 --> The HTML element defines smaller text:

    HTML Small Formatting

  • - Deleted text 定义删除线 --> The HTML element defines deleted (removed) text.

    My favorite color is blue red.

    `

  • - Inserted text 定义插入字 --> The HTML element defines inserted (added) text.

    My favorite color is red.

  • - Subscript text 定义下标字 --> The HTML element defines subscripted text.

    This is subscripted text.

  • - Superscript text 定义上标字 --> The HTML element defines superscripted text.

    This is superscripted text.

HTML "计算机输出" 标签

  • 定义计算机代码
  • 定义键盘码
  • 定义计算机代码样本
  • 定义变量
  •  定义预格式文本

HTML 引文, 引用, 及标签定义

  • Defines an abbreviation or acronym 定义缩写 The HTML element defines an abbreviation or an acronym. Marking abbreviations can give useful information to browsers, translation systems and search-engines.

The WHO was founded in 1948.

  • Defines contact information for the author/owner of a document 定义地址The HTML
    element defines contact information (author/owner) of a document or an article. The
    element is usually displayed in italic. Most browsers will add a line break before and after the element.
Written by John Doe.
Visit us at:
Example.com
Box 564, Disneyland
USA
  • Defines the text direction 定义文字方向 The HTML element defines bi-directional override. The element is used to override the current text direction:
This text will be written from right to left
  • Defines a section that is quoted from another source 定义长的引用 The HTML
    element defines a section that is quoted from another source. Browsers usually indent
    elements.

Here is a quote from WWF's website:

For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
  • Defines a short inline quotation 定义短的引用语 The HTML element defines a short quotation. Browsers usually insert quotation marks around the element.

WWF's goal is to: Build a future where people live in harmony with nature.

  • Defines the title of a work 定义引用、引证 The HTML element defines the title of a work. Browsers usually display elements in italic.

The Scream by Edvard Munch. Painted in 1893.

  • 定义一个定义项目

你可能感兴趣的:(HTML 文本格式化)