Giter VIP home page Giter VIP logo

Comments (2)

SelenIT avatar SelenIT commented on May 18, 2024

Strictly speaking, there is no such thing as "inline-block tags", as well as there are no "inline tags" and "block tags" since HTML4/XHTML1 (where the "block and inline elements" concept came from) became outdated.

As of HTML5, there are elements with different content models and different default presentation. The latter can be overridden via CSS, the former can't. There is "phrasing content", roughly corresponding to "inline elements" from HTML4, and "flow content", roughly corresponding to "inline and block elements" (all visually displayed elements). But their default presentation can be different (form controls and media elements usually behave as inline blocks, table elements have table-specific presentation rules, ruby element has its own layout model, etc.). The nesting rules are also more complicated than "inline contains inlines, block contains inlines or blocks" (e.g. the a element can contain blocks, but can't contain other interactive elements, lists can contain only list items, tr can contain only table cells, etc.). So, in my opinion, the old "inline"/"block" dichotomy shouldn't be applyed to HTML5 at all, it brings more confusion than clarity.

But even if we simply call the phrasing content "inline" and non-phrasing flow content "block" (which looks a huge oversimplification to me), some elements in the table seem to be categorized incorrectly. For example, select and ruby elements should be categorized as "inline" (they don't break text lines and can be contained in other phrasing elements), and dt element should be categorized the same way as dd and li elements (and definitely not as "inline").

from html-reference.

SelenIT avatar SelenIT commented on May 18, 2024

Still, how can the dd element be 'inline' by any definition? Even in HTML4, although it was listed neither as inline nor as block, it had the flow content model (that includes block content), which is impossible for 'inline' elements. In HTML5, it also has the "Flow content" content model and is rendered by default as display:block.

So, in terms of inline-vs-block dichotomy (leaving aside its applicability to HTML5), it should be labelled as 'block', not 'iline' (or — even better — as none of them, just like the dt element currently is).

from html-reference.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.