Results 1 to 4 of 4

Thread: Correct format or not?

  1. #1
    Join Date
    May 2011
    Location
    Bangalore
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Correct format or not?

    <div> element inside the anchor<a> tag, ordered/unordered list tag and etc is correct html format or not.....

  2. #2
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there ashokbe

    it is not permisible to place...

    ...within...

    coothead

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    in html4, this is correct. however, it works in all modern browsers (though it is sometimes "buggy" in Internet Explorer), and it is valid in html5.

  4. #4
    Join Date
    Jul 2011
    Location
    Lockport, Illinois
    Posts
    35
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    Technically it should work but why are you putting a div into an anchor? If it is so you can make the anchor have a specific appearance, it may be easier and less buggy to make your list inside a div, then but the style attributes of your <div> apply to the anchor inside the list. For example:

    (Style.css)
    Code:
    div#yourdiv ul li a
    {
    /* Put your properties here */
    }
    (index.html)
    Code:
    <div id="yourdiv">
        <ul>
            <li><a>Your anchor text here</a></li>
        </ul>
    </div>

    -JL Griffin

Bookmarks

Posting Permissions

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