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 9238371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:44:46+00:00 2026-06-18T07:44:46+00:00

Possible Duplicate: Browsers' default CSS for HTML elements Is there a reference somewhere of

  • 0

Possible Duplicate:
Browsers' default CSS for HTML elements

Is there a reference somewhere of all the default styles of DOM elements?

For example, how big the margin above an <h1> is?

Is there some easy way to extract this? I tried:

document.getElementById("myheading").style.marginTop

But it returned blank. Presumably because nothing had been defined for marginTop?

Thanks in advance.

  • 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-18T07:44:48+00:00Added an answer on June 18, 2026 at 7:44 am

    You have a few options. The specs have a loosely defined list. HTML4 and HTML5

    If you wish to actually see the computed style, you can use a program like Firebug, Chrome Developer Tools, IE Developer Tools, or Opera Dragonfly.

    If you need to programmatically get the computed style, I recommend that you use jquery to even out the differences, or use the getComputedStyle() or currentStyle attributes of an element. jQuery does this for you automatically.

    If you just want to know how to handle this cross-browser without going insane, I recommend using a Reset Stylesheet. There are many. Eric Meyer’s is the most famous, but nowadays there are many tools, like Bootstrap, Blueprint, Normalize, and YUI.

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

Sidebar

Related Questions

Possible Duplicate: Browser’s Default CSS Is there a list of the default html elements
Possible Duplicate: A good Javascript API reference documentation related to browsers and DOM I've
Possible Duplicate: How to encrypt HTML, CSS and JavaScript to prevent theft Is there
Possible Duplicate: Why do browsers create vendor prefixes for CSS properties? For example, if
Possible Duplicate: CSS to make HTML page footer stay at bottom of the page
Possible Duplicate: Using <meta> tags to turn off caching in all browsers? I am
Possible Duplicate: Javascript Object.Watch for all browsers? I just read Mozilla's documentation for the
Possible Duplicate: Commenting out stylesheets in HTML documents to support older browsers I am
Possible Duplicate: Commenting out stylesheets in HTML documents to support older browsers I'm trying
Possible Duplicate: Making sure a web page is not cached, across all browsers 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.