CSS attributes possible for a given HTML tag

Posted on 2008-11-09
Last Modified: 2013-11-19
Hello all,

I am new to CSS and I am going through some CSS tutorials/books. I was wondering if there is a resource online that lists all the possible attribute styles(like width, position, border..) that can be applied to a given HTML tag. Everytime I go through a tutorial, I find bits and pieces of information and new CSS attributes.

I am a programmer and from that perspective, Is there any hierarcy like.
1 a base set of attributes that are common to all tags and...  
2 some tags have more specific attributes.

(Other than and w3c)

Question by:tvr1729
    LVL 42

    Accepted Solution

    Good question. Theoretically all properties can apply to all elements. However, some properties only apply when an element has certain other properties set. For example, the width and height properties don't apply to inline elements, like <a>s and <span>s are by default. Another example would be that the top, left, right, bottom, and z-index properties don't apply to non-positioned elements (elements that don't have their position property set to a valid value other than "static", which is the default value). For yet another example, border-collapse only applies to elements with display:table or display:inline-table (IE7 doesn't support those, but IE8 will).

    Here's a very good CSS Reference site:
    LVL 42

    Expert Comment

    by:David S.
    To clarify what I said, IE5+ do support border-collapse. They just have it bound directly to <table> elements instead of to display:table and display:inline-table like other browsers do.

    Author Comment


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
    In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at Browse or search based on font properties or name to find a suitable font for…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now