I found that body tags, and paragraph tags add margins and spacing, so I was wondering what other elements have unique styling properties.
Also, what would be an good way to disable them? What I have now is:开发者_C百科
body, h1, h2, h3, h4, h5, h6, p, a, {
border: 0 none;
font-family: inherit;
font-size: 100%;
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0 none;
padding: 0;
}
The major difference is some elements are "block" and some are inline. However, that can be changed as well.
a {
display:block;
height:100px;
width:600px;
margin:auto;
background:url ...
}
So to answer your question all elements. Even your own ...
<script>
document.createElement("myelement");
</script>
<style>
myelement {
display:block;
width:300px;
height:300px;
}
</style>
<html>
<myelement>I've made my own standard - but it does not validate with html checkers</myelement>
</html>
This allows html5 elements to be created for non HTML5 browsers ... http://net.tutsplus.com/tutorials/html-css-techniques/how-to-make-all-browsers-render-html5-mark-up-correctly-even-ie6/
W3C does not want you to create myelements though.
blockquote, em, strong are a few others. If you want to work with the assumption that nothing has style, you could set the defaults to *{ }
as * selects all elements.
Pretty much every element (except span, I think) has a default styling. But other that have default margin/padding are ul
and ol
.
If you want to disable them, you can use the global CSS selector, *.
* {
/* Default styles */
}
精彩评论