


What is the definition of css block-level elements? What are the css block-level elements?
What are css block-level elements? For some friends who have just learned CSS, they may not understand this issue well. So, in this article, I will introduce to you the definition of css block-level elements, and what are the css block-level elements?
The definition of css block-level elements
According to the explanation on W3C, block (block-level) elements are displayed on an exclusive line. Its sibling elements must not be on the same line as it (unless out of the document flow). In fact, in layman's terms, block elements are generally container elements for other elements and can accommodate other block elements or inline elements. The most common ones are P and div. To put it simply, the block element is like a four-square box that can hold other four squares and can be presented anywhere on the page.
If you still don’t understand the above definition of CSS block-level elements, let’s take a look at the three characteristics of CSS block-level elements:
1. Each block-level element is unique If it occupies one line, the following elements can only start on another line, and two elements cannot share the same line.
2. The height, width, line height and top and bottom margins of the element can be set.
3. If the width of the element is not set, it defaults to the width of the parent element.
After reading the characteristics of these three css block-level elements, we should now have a better understanding of css elements. Then let’s take a look at what are the css block-level elements?
What are the block-level elements in css?
Common css block-level elements:
address: address. blockquote: block quote. center: Center alignment block. dir: Directory list. div: Commonly used block level is also the main tag of CSS layout. dl: definition list. fieldset: form control group. form: interactive form. h1–h6: Title. hr: horizontal dividing line. isindex: input prompt. |
menu: menu list. noframes: frames optional content, (this block content is displayed for browsers that do not support frames). noscript: Optional script content (displayed for browsers that do not support script). ol: Ordered form. p: Paragraph. pre: Formatted text. table: table. ul: Unordered list. |
The introduction to css block-level elements ends here. The next article will introduce you to What are the css inline elements? The difference between css block-level elements and inline elements.
Related recommendations:
What are inline elements and block-level elements? _html/css_WEB-ITnose
Introduction to CSS block-level elements/inline elements, inheritance and related properties
The above is the detailed content of What is the definition of css block-level elements? What are the css block-level elements?. For more information, please follow other related articles on the PHP Chinese website!

I got this question the other day. My first thought is: weird question! Specificity is about selectors, and at-rules are not selectors, so... irrelevant?

Yes, you can, and it doesn't really matter in what order. A CSS preprocessor is not required. It works in regular CSS.

You should for sure be setting far-out cache headers on your assets like CSS and JavaScript (and images and fonts and whatever else). That tells the browser

Many developers write about how to maintain a CSS codebase, yet not a lot of them write about how they measure the quality of that codebase. Sure, we have

Have you ever had a form that needed to accept a short, arbitrary bit of text? Like a name or whatever. That's exactly what is for. There are lots of

I'm so excited to be heading to Zürich, Switzerland for Front Conference (Love that name and URL!). I've never been to Switzerland before, so I'm excited

One of my favorite developments in software development has been the advent of serverless. As a developer who has a tendency to get bogged down in the details

In this post, we’ll be using an ecommerce store demo I built and deployed to Netlify to show how we can make dynamic routes for incoming data. It’s a fairly


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

WebStorm Mac version
Useful JavaScript development tools