Home  >  Article  >  Web Front-end  >  HTML5 tags that cannot wrap

HTML5 tags that cannot wrap

青灯夜游
青灯夜游Original
2022-07-29 17:33:024024browse

html5 cannot wrap tags: 1. a, defines a hyperlink, used to link from one page to another; 2. abbr, used to represent an abbreviation or acronym; 3. b , defines bold text; 4. bdo, defines text direction; 5. cite, defines the title of the work; 6. em, used to present emphasized text; 7. i, defines italics; 8. img, defines HTML The image in the page; 9. input, defines the input box; 10. sub, defines the subscript text; 11. sup, defines the superscript text.

HTML5 tags that cannot wrap

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

Tag elements in HTML are generally divided into three different types: block elements, inline elements, and inline block elements.

Inline elements and inline block elements cannot be wrapped.

Characteristics of inline elements:

1. Displayed in one line with other inline elements from left to right, without automatic line wrapping. The default arrangement is From left to right;

2. You cannot directly control the width, height and related css properties of the box model, but you can directly set the left and right values ​​​​of the inner and outer margins

3. Inline elements The width and height are determined by the size of the content (text, pictures, etc.)

4. Inline elements can only accommodate text or other inline elements (please note here that do not nest in inline elements) Block-level elements)

Because of its own characteristics, we usually use inline elements to build text and small icons (small structures).

Characteristics of inline block elements:

1. They are on the same line as other elements and will not wrap automatically. The default arrangement is from left to right;

2. The height, width, line height, top and bottom margins of the element can be set.

Inline block elements combine the characteristics of inline elements and block elements, but each has its own trade-offs. Therefore, inline block elements are used more often due to their characteristics in daily use, and are useful in many aspects.

So html cannot wrap tag elements (inline elements and inline block elements):

  • a - Define hyperlinks for starting from One page links to another page.

  • abbr - used to represent an abbreviation or acronym, such as "WWW" or "NATO".

  • acronym - Defines an acronym (Not supported in HTML5).

  • b - Defines bold text.

  • bdo - Define the text direction, which can override the default text direction.

  • big - defines large text (

    HTML5 does not support ).

  • cite - A quote that defines the title of a work (such as a book, song, movie, television show, painting, sculpture, etc.).

  • code - computer code (required when citing source code);

  • dfn - is a phrase tag used to define a definition project .

  • del - Text that has been deleted in the document


  • em - Used to render highlighted text.

  • font - Specifies the font, font size, and font color of the text (

    HTML5 does not support ).

  • i - italic;

  • #img - Defines an image in an HTML page.

  • input - input box;

  • kbd - define keyboard text;

  • label - table Tags;

  • ##q - short quote;
  • s - underscore (not recommended);
  • samp - Defining sample computer code;
  • select - Project selection;
  • small - Small font text;
  • span - commonly used inline container, defines blocks within text;
  • strike - underline, defines strikethrough text (
  • HTML5 does not support

    )

  • strong - bold emphasis;
  • sub - subscript;
  • sup - superscript;
  • textarea - multi-line text input box;
  • tt - telex text;
  • u - underscore;
  • var - defines variables.
  • [Recommended courses:
HTML5 video tutorial

, web front-end]

The above is the detailed content of HTML5 tags that cannot wrap. 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