Home >Web Front-end >HTML Tutorial >What are HTML structural elements? Summary of various structural elements in HTML (plain text)

What are HTML structural elements? Summary of various structural elements in HTML (plain text)

不言
不言Original
2018-07-21 16:46:243753browse

In a web document, various elements will be displayed. Each element has its specific position. In order to standardize these elements, it needs to be determined by the structural elements in HTML.

Function Description: The tag specifies the default address or default target for all links on the page. Normally, the browser fills in the gaps in a relative URL by extracting the corresponding elements from the current document's URL.

Standard attributes: href, target

href: Set or get the URL that all links in the page link to when the mouse clicks

target: Set or get the target content to be displayed In which window or frame

_blank: Load the document in a new unnamed window

_self: Load the target document in the same frame or window

_parent : Load the document into the parent window or the frameset containing the hyperlink reference

_top: Load the document into the window containing the hyperlink, replacing any frame currently displayed in the window

……

Function description: Define the body of the HTML document. The body contains all the content of the HTML document.

Standard attributes: id (unique identification of the element), class (class name), title (text displayed in the tool tip), style (inline style definition), dir (set text direction), lang (set Language code), background (web page background image), bgcolor (background color), text (set text color), link (set link text color), alink (set link text color), vlink (set link text color) Color), leftmargin (left margin), topmargin (top margin), bgproperties (so that the background image does not scroll with the web page, it has only one parameter, fixed)

When the same properties appear in the future, they will not be explained anymore. Explain

……

Function description: Define a paragraph of a document

Standard attributes: align, id, class, title, style, dir, lang

Usage points: Use p to wrap lines and separate paragraphs. The p element is a block element and needs to be closed with the tag

……

Function Description: Used to combine inline elements in the document

Standard attributes: align, id, class, title, style, dir, lang

……

Function description: Define partitions or sections in the document

Standard attributes: align, id, class, title, style, dir, lang

Usage points: The p element is used to create HTML documents Provide structure and background elements for large blocks of content


Function description: Insert a newline character

Standard attributes: id, class, title, style

……

Function Description: Define a table title

Standard attributes: align (alignment, including left (left alignment), right (right alignment), top (top alignment), bottom (bottom alignment)), id, class, title, dir, lang

Usage points: caption The element should be a child object of the table element, and the caption tag must immediately follow the table tag. Only one title can be defined for a table, usually the title is centered above the table.

Function description: Define column attribute values ​​for the table. The defined object can include one or more columns in the table

Standard attributes: id, class, title, style, dir, lang

Optional attributes: align (horizontal alignment, including right (right alignment), left (left alignment), center (center), justify (Alignment at both ends)

SPAN (Definition & lt; color; MIDDLE (vertical center), BOTTOM (low -end alignment), baseline (baseline alignment))

completely #Function Description: Define the grouping of table columns

Standard attributes: id, class, title, style, dir, lang

Optional attributes: align, span (define the columns that col should span number, the default value is 1), valign, widthUsage points: It is legal only within the table tag, and the columns can be combined to perform corresponding formatting

fieldset

Function description: Group related elements in the form

Standard attributes: id, class, title, style, dir, lang

Usage points: A box is drawn outside the text and other elements contained in the field set

……

Function Description: A title can be defined for the fieldset

Standard attributes: id, class, title, style, dir, lang

Usage points: the legend element must be the first element in the fieldset. This element is an inline element and needs to be closed. Label

Function Description: Create an inline frame containing external documents

Standard attributes: id, class, title, style

Basic attributes: name (define the name of the content page), src (define the URL of the content page), frameborder (define the border of the content page, the value is 0/1, the default is 1, 0 is not displayed Border, 1 displays borders between each page), marginwidth (defines the width of the upper and lower borders displayed by the HTML file in the frame, the default value is determined by the browser), marginheight (defines the width of the left and right borders displayed by the HTML file in the frame, The default value is determined by the browser), scrolling (defines whether there is a scroll bar, the value is yes/no/auto, the default value is auto), align, height, width

Usage points: The role of the iframe element is equivalent to To embed a document within another document, or create an inline floating frame like a floating frame, in the iframe content source document, the background-color or bgcolor tag attribute of the body element must be set to transparent. This element is a block element and requires a closing tag

##
……

< dd>…

< ;/dl>

Function Description: dd defines the display style in the list

        dl defines the display style of the list

              dt defines the items in the list

Standard attributes: id, class, title, style, dir, lang

Usage points: dd is usually displayed indented in the list, the dd element is a block element, and the tag needs to be closed

          dl element It is a block element and needs to be closed with the tag

              dt The element is a block element and needs to be closed with the tag

h1...h6

...

Function description: Define the title of the article

Standard attributes: align, id, class, title, style, dir, lang

Usage points:

Define the largest Title,

defines the smallest title and needs to close the tag

……

Function Description: Declare that the document itself is An HTML document

Standard attributes: dir, lang

Basic attributes: common (general attributes), xmlns (represents xml namespace), dir

< ins>……

Function description: Define the text that has been inserted in the document

Standard attributes: id, class, title, style, dir, lang

Usage points: ins and del tags are used together to describe updates and corrections in the document

……

Function Description: Define deleted text in the document

Standard attributes: id, class, title, style, dir, lang

##
  • ……< ;/li>

    Function description: Define a list item

    Standard attributes: id, class, title, style, dir, lang

    Usage points: li Tags can be used in ordered lists

      and unordered lists

          ......

        Function Description : Define an ordered list

        Standard attributes: id, class, title, style, dir, lang

          ……

        Function Description: Define an unordered list

        Standard attributes: id, class, title, style, dir, lang

        ……Function description: Define the relevant format of the table

        Standard attributes: align, id, class, title, style, dir, lang

        Usage points: use To display data, table is a block element and needs to be closed with a tag

        Function Description: Define the table within the table Header cell

        Standard attributes: id, class, title, style, dir, lang

        Basic attributes: common, abbr (abbreviation for table header), axis (concept for the cell) upper classification), colspan (one row spans multiple columns), headers (connects the data and headers of the table), rowspan (one column spans multiple rows), scope (defines the header of the row or column), align, valign

        Usage points: The text inside the th element is usually rendered in bold

        ……

        Function Description: In the table Define a row

        Standard attributes: id, class, title, style, dir, lang

        Basic attributes: common, align, valign

        Function Description: Define a cell in the table

        Standard attributes: id, class, title, style, dir, lang

        Basic attributes: common, abbr (abbreviation for table header), axis (conceptually classifying cells), colspan (one row spans multiple columns), headers (connecting the data and headers of the table), rowspan (one column) span multiple rows), scope (define the header of a row or column), align, valign

        tbody

        Function Description: Define the format of a table body

        Standard attributes: id, class, title, style, dir, lang

        Usage points: The table can be divided into a separate part, and one or several rows in the table can be combined into a group, but It is best not to have tbody tags in the table, and cannot cross from one tbody to another tbody

        tfoot

        Function Description: Define the format of table footnotes

        Standard attributes: id, class, title, style, dir, lang

        Usage points: The valid tags contained in the tfoot element are td, tr, th, and any given table object can only define one tfoot. This element requires a closing tag

        thead

        Function description: Define the format of the header

        Standard attributes: id, class, title, style, dir , lang

        Usage points: Thead must have a tr tag inside, and this element will not change the display. If you use thead, tfoot, and tbody elements, you must use all of them. The order of their appearance is thead, tfoot, tbody. These tags must be used inside the table element

        Related recommendations:

        Analysis of meta information meta tag attributes in HTML (with code)

        Introduction to how to dynamically generate html elements and add attributes to elements (with code)

        The above is the detailed content of What are HTML structural elements? Summary of various structural elements in HTML (plain text). For more information, please follow other related articles on the PHP Chinese website!

        Statement:
        The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
        ……
        … …