(go) HTML block-level elements and inline elements-which are block-level and which are inline objects

Source: Internet
Author: User

  1. Block elements generally start from the new line, which can accommodate inline elements and other block elements, and the common block element is the paragraph label ' P '. The block element of "form" is special, and it can only be used to accommodate other block elements.
  2. If there is no CSS, the block elements are ordered to go down in a row each time. With CSS, we can change the default layout of this HTML and put the block elements where you want them. Instead of every stupid other line. It should be noted that table tags are also one of the block elements, table based layout and CSS based layout from the perspective of the general user (not including visually impaired, blind, etc.) of the two layouts, in addition to the page loading speed differences, there is no other difference. But if ordinary users inadvertently point to the page Source code button, the difference between the two is very large. Based on the concept of good reconstruction of CSS layout page source code, at the very least, can let no web development experience of ordinary users to quickly read the content. From this point of view, CSS layout code should have a better aesthetic experience.
  3. You can think of the block element div as a box, or if you've played a clip, it's easier to understand. We first cut down the articles we need from various newspapers and magazines. Each cut is a block. Then we put the pieces of paper on a blank new piece of paper according to our own layout intent. This will create your own unique digest letters. As an extension of technology, Web page layout design also follows the same pattern.
  4. Inline elements (inline element) are generally based on semantic level (semantic) basic elements. Inline elements can only hold text or other inline elements, common inline element "a".
  5. Both the block element and the inline element are concepts in the HTML specification. The basic difference between a block element and an inline element is that the block element generally starts from the new row. When CSS control is added, this attribute difference between the block element and the inline element does not become a difference. For example, we can completely add an inline element cite to a property such as Display:block, so that he also has properties that start from the new line each time.
  6. The basic concept of a mutable element is that he needs to determine whether the element is a block element or an inline element based on the context relationship. Mutable elements are also part of the above two categories of elements, and once the context determines his category, he follows the rules of block elements or inline elements. The approximate elements are categorized in full.
  7. The Chinese term for inline element has a variety of inline elements, inline elements, in-line elements, and straight-forward elements. Basically there is no unified translation, love how to call it. In addition to the inline element, we think that the property of a display is display:inline, which fixes the famous IE double floating boundary problem.
  8. Block element
  9. * Address-addresses
  10. * BLOCKQUOTE-Block reference
  11. * Center-align Block
  12. * DIR-List of directories
  13. * Div-Common block-level easy, is also the main tag of CSS layout
  14. * DL-Definition List
  15. * Fieldset-form control Group
  16. * Form-Interactive form
  17. * H1-Big title
  18. * H2-Subtitle
  19. * H3-3 level Title
  20. * H4-4 level Title
  21. * H5-5 level Title
  22. * H6-6 level Title
  23. * HR-Horizontal divider Line
  24. * Isindex-input Prompt
  25. * menu-List of menus
  26. * Noframes-frames Optional content, (for browsers that do not support frame, display this chunk content
  27. * NoScript-Optional script content (this content is displayed for browsers that do not support script)
  28. * Ol-Sort Form
  29. * P-Paragraph
  30. * Pre-formatted text
  31. * Table-form
  32. * ul-Non-sorted list
  33. Inline elements (inline element)
  34. * A-Anchor point
  35. * ABBR-abbreviation
  36. * Acronym-First word
  37. * B-Bold (not recommended)
  38. * Bdo-bidi Override
  39. * Big-Large font
  40. * BR-line break
  41. * Cite-citation
  42. * Code-computer code (required when referencing the source)
  43. * DFN-Define Fields
  44. * EM-emphasis
  45. * Font-typeface settings (not recommended)
  46. * I-Italic
  47. * img-Images
  48. * Input-Enter box
  49. * KBD-Define keyboard text
  50. * Label-table label
  51. * Q-Short reference
  52. * S-Medium dash (not recommended)
  53. * Samp-Define sample computer code
  54. * Select-Project selection
  55. * Small-Small font text
  56. * span-a common inline container that defines chunks within a text
  57. * Strike-Medium dash
  58. * Strong-Bold Emphasis
  59. * Sub-subscript
  60. * SUP-Superscript
  61. * TEXTAREA-multi-line text input box
  62. * TT-Telex text
  63. * U-Underline
  64. * var-Define Variables
  65. Variable element
  66. A mutable element is a block element or an inline element that determines whether the element is in context.
  67. * Applet-java Applet
  68. * Button-Buttons
  69. * Del-delete text
  70. * Iframe-inline Frame
  71. * INS-Inserted text
  72. * Map-image block (map)
  73. * Object-object Object
  74. * Script-client-side scripting

(go) HTML block-level elements and inline elements-which are block-level and which are inline objects

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.