Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder Apothem's Avatar
    Join Date
    Mar 2008
    Posts
    380
    Thanks
    36
    Thanked 25 Times in 25 Posts

    Is there a site that tells what tags are allowed in x tag?

    Is there a website which tells you what other tags are allowed in a parent tag?

    For instance, what tags are allowed inside <p></p>? Or What tags are allowed inside <a></a>? etc. etc.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,635
    Thanks
    6
    Thanked 1,003 Times in 976 Posts
    Well, I don’t know of any site specifically telling that but there are general rules:
    1. Block-level elements and table cells can contain other block-level elements and inline elements.
    2. Inline elements can only contain other inline elements.
    3. Paragraphs are a special case of block element: They can only contain inline elements, too.
    4. Forms are block-level elements and can hold anything but input elements can’t be direct children, they must be in some other block-level container (e. g. a. fieldset).


    Now you only need to find out what is a block-level element and what an inline element.

  • #3
    New to the CF scene
    Join Date
    May 2009
    Location
    New York City
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try looking around w3schools.com. The previous post pretty much mentioned everything, but just validate everything time to time to see if theres anything you've missed.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    ..and there are some special tags like <ul>,<ol>,<li>,<dd>,<dt>,<dd> etc, for which we need to obey some nesting rules. Refer http://htmldog.com/reference/htmltags/ul/ and related links.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •