Block (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms 编辑
A block on a webpage is an HTML element that appears on a new line, i.e. underneath the preceding element in a horizontal writing mode, and above the following element (commonly known as a block-level element). For example, <p>
is by default a block-level element, whereas <a>
is an inline element — you can put several links next to one another in your HTML source and they will sit on the same line as one another in the rendered output.
Using the display
property you can change whether an element displays inline or as a block (among many other options); blocks are also subject to the effects of positioning schemes and use of the position
property.
Learn more
General knowledge
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论