📜  HTML标记

📅  最后修改于: 2020-11-01 04:01:55             🧑  作者: Mango

HTML标签

HTML标签就像关键字一样,定义了Web浏览器如何格式化和显示内容。借助标签,Web浏览器可以区分HTML内容和简单内容。 HTML标签包含三个主要部分:开始标签,内容和结束标签。但是某些HTML标记是未封闭的标记。

当网络浏览器读取HTML文档时,浏览器从上到下以及从左到右读取。 HTML标记用于创建HTML文档并呈现其属性。每个HTML标签都有不同的属性。

HTML文件必须具有一些基本标记,以便Web浏览器可以区分简单文本和HTML文本。您可以根据代码要求使用任意数量的标签。

  • 所有HTML标记必须包含在这些括号内。
  • HTML中的每个标签执行不同的任务。
  • 如果您使用了开放标签,则必须使用封闭标签(某些标签除外)

句法

内容

HTML标签示例

注意:HTML标记始终以小写字母书写。基本的HTML标签如下: 

Paragraph Tag

Heading Tag

Bold Tag Italic Tag Underline Tag

未封闭的HTML标签

某些HTML标记未关闭,例如br和hr。


标记:br代表换行符,它折断了代码行。


标签:hr代表水平尺。此标记用于在网页上放置一行。

HTML元标记

DOCTYPE,标题,链接,元和样式

HTML文字标签

,,,,
, , , , , , , and
, , , , , , , and
, , , , , , , and
 , , , , , , , and

HTML链接标签

HTML图像和对象标签

HTML列表标签

    1. HTML表格标签

      表,tr,td,th,tbody,thead,tfoot,col,colgroup和caption

      HTML表单标签

      表单,输入,文本区域,选择,选项,optgroup,按钮,标签,字段集和图例

      HTML脚本标记

      脚本和脚本

      注意:我们将在以后的章程中看到使用这些标签的示例。

      HTML标签列表

      以下是HTML标签的完整列表以及按字母顺序排列的描述。

      注意:此处表示HTML5中新添加的Elements。

      HTML字母标记

      element.
      Tag name Description
      This tag is used to apply comment in an HTML document.
      This tag is used to specify the version of HTML
      A
      It is termed as anchor tag and it creates a hyperlink or link.
      It defines an abbreviation for a phrase or longer word.
      It defines acronym for a word. (Not supported in HTML5)
      It defines the author’s contact information of the HTML article
      It defines an embedded Java applet. (Not supported in HTML5)
      It defines the area of an image map.
      It defines the self-contained content.
      It defines content aside from main content. Mainly represented as sidebar.
      It is used to embed sound content in HTML document.
      B
      It is used to make a text bold.
      This tag defines the base URL for all relative URL within the document.
      This tag is used to set default font, size and color for all elements of document. (Not supported in HTML5)
      This tag is used to provide isolation for that part of text which may be formatted in different directions from its surrounding text.
      It is used to override the current text direction.
      This tag is used to make font size one level larger than its surrounding content. (Not supported in HTML5)
      It is used to define a content which is taken from another source.
      It is used to define the body section of an HTML document.

      It is used to apply single line break.
      It is used to represent a clickable button
      C
      It is used to provide a graphics space within a web document.
      It is used to define a caption for a table.
      It is used to align the content in center. (Not supported in HTML5)
      It is used to define the title of the work, book, website, etc.
      It is used to display a part of programming code in an HTML document.
      It defines a column within a table which represent common properties of columns and used with the
      It is used to define group of columns in a table.
      D
      It is used to link the content with the machine-readable translation.
      It is used to provide a predefined list for input option.
      It is used to provide definition/description of a term in description list.
      It defines a text which has been deleted from the document.
      It defines additional details which user can either view or hide.
      It is used to indicate a term which is defined within a sentence/phrase.
      It defines a dialog box or other interactive components.
      It is used as container for directory list of files. (Not supported in HTML5)
      It defines a division or section within HTML document.
      It is sued to define a description list.
      It is used to define a term in description list.
      E
      It is used to emphasis the content applied within this element.
      It is used as embedded container for external file/application/media, etc.
      F
      It is used to group related elements/labels within a web form.
      It is used to add a caption or explanation for the
      element.
      It is used to define the self-contained content, and s mostly refer as single unit.
      It defines the font, size, color, and face for the content. (Not supported in HTML5)
      It defines the footer section of a webpage.
      It is used to define an HTML form.
      It defines a particular area of webpage which can contain another HTML file. (Not supported in HTML5)
      It defines group of Frames. (Not supported in HTML5)
      H

      to

      It defines headings for an HTML document from level 1 to level 6.
      It defines the head section of an HTML document.
      It defines the header of a section or webpage.

      It is used to apply thematic break between paragraph-level elements.
      It represents root of an HTML document.
      I
      It is used to represent a text in some different voice.