Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8870159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:39:12+00:00 2026-06-14T17:39:12+00:00

What does an empty p-element mean? Why is it rendered the way it is?

  • 0

What does an empty p-element mean? Why is it rendered the way it is?

<p>Something...</p>
<p></p>
<p>Something else...</p>

<p></p>: Chrome will ignore it – yet it claims to be giving it a -webkit-margin-after:1em, yet it somehow overlaps the following paragraph’s text (see developer mode)

<p style='margin-top:2em'>: Chrome displays the top margin

<p style='font-size:2em'>: Chrome displays it, even though it is empty????

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:39:14+00:00Added an answer on June 14, 2026 at 5:39 pm

    To quote from developer.mozilla.org/en-US/docs/CSS/margin_collapsing [Thanks to Llepwryd’s comment, it provides much needed info]

    Empty blocks:
    If there is no border, padding, inline content, height, or min-height to separate a block’s margin-top from its margin-bottom, then its top and bottom margins collapse.

    So:

    <p></p>: No content or height, top and bottom margin collapse into 1em. Developer mode shows 2em of margins, overlapping next paragraph’s text – I would guess this is a mistake?

    <p style='margin-top:2em'>: ditto the above, except the margins collapse to 2em.

    <p style='font-size:2em'>: some guesswork – the margins are 1em, where the margin’s em is equivalent to the font size of the paragraph, thus 1em of margin is equivlant to 2em of regular text. Now ditto the above, collapse the margins, and we have 2em of spacing between first and third paragraph.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anybody know a proper, cross-browser way to empty an IFrame? Is about:blank recognized
Is empty a valid value for XML namespace? If yes what does it mean?
I have an empty list accepting string values. When an element will be added
This question is spawned from the partial answer to JSF2: why does empty test
Why does this empty the text immediately (ignoring delay)? $('#error_box_text').html('error text').delay(5000).html('') # jQuery 1.4
How to make spinner to fill empty place in left side? android:layout_width=fill_parent does not
Does anyone know if there is a way to generate different code in the
I need to create an XPath expression that does the following: Returns the element
I have this really simple observable element which for some reason does not update
According to the XML spec, this is the definition of an empty element: An

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.