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

  • SEARCH
  • Home
  • 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 7549679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:00:29+00:00 2026-05-30T10:00:29+00:00

I have some HTML code. Here is a link to a fiddle with a

  • 0

I have some HTML code. Here is a link to a fiddle with a snippet:
http://jsfiddle.net/U32UU/2/

The problem does not show up in jsfiddle, but you can copy the snippet locally and see it in your browser. With the doctype specification included, the issue is everything that has the “error” style tag is badly formatted. There is space added above and below that row. If I remove the doctype directive, then the problem goes away and the formatting looks good.

Looking here: http://www.w3schools.com/tags/ref_html_dtd.asp

I am not doing anything not supported by that doctype. I am also wondering if I even need the doctype specification. It seems to work just fine without it, but I would like to know why the formatting issue is there.

  • 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-05-30T10:00:31+00:00Added an answer on May 30, 2026 at 10:00 am

    Paragraphs are supposed to have margins. In strict mode (with a DOCTYPE), they always do, but in quirks mode (without a DOCTYPE), the margins disappear when the paragraph is put inside a table. This is a error in the browser! (A deliberate one, by the way.)

    So if you want a paragraph without margins, set its margin property to 0.

    p {margin:0}
    

    or if you want this to happen only inside tables,

    table p {margin:0}
    

    This will work in both strict and quirks mode.

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

Sidebar

Related Questions

i have html code block like this <div id=some-div> <a href=# class=link-click>some link text</a>
I have inherited some HTML code and have been asked to align the two
I have some HTML errors in my output source code, coming from one of
I have simple HTML code with some JavaScript. It looks like: <html> <head> <script
I have some PHP code that generates a calendar and then outputs html to
I have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some
Let's say I have some code like this: <html> <head><title>Title</title></head> <body> <?php if (!$someCondition){
I have the following html code: <mytag> Just Some Text </mytag> And I have
I have a web application with bunch of HTML code. There are some style-attributes
I have the following code in JavaScript and jQuery: $(<li />) .html('Some HTML') I

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.