How many types of display in html?

There are several types of displays that can be used in HTML, including:

  1. block: This type of display causes an element to take up the full width of its parent container and create a new line after it.

  2. inline: This type of display causes an element to only take up as much space as necessary and allows other elements to be displayed on the same line.

  3. inline-block: This type of display combines the characteristics of both inline and block elements, allowing an element to be displayed inline with other elements but still allowing it to have its own dimensions (such as width and height).

  4. none: This type of display causes an element to not be displayed on the page at all.

Additionally, there are other less commonly used display types, such as flex and grid, which are used for more advanced layout and positioning of elements on a page.

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(21)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2020-12-11 vs code的插件
2020-12-11 Vue Tooling -->Single File Components
2020-12-11 Vue Component Registration
2020-12-11 Vue Components Basics
2020-12-11 Vue初级教程
2020-12-11 pip install fails with “connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)”
2019-12-11 What is the difference between UNION and UNION ALL?
点击右上角即可分享
微信分享提示