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

不言
Release: 2018-07-21 16:46:24
Original
3719 people have browsed it

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