Cookie Policy: This web site uses cookies. By using this site you agree to our cookie policy.
Disclaimer: By posting on this web site it is accepted that you have agreed to the T&C. This is an information forum, and it is just that information, all views are of the individual poster and not that of the site owner. Please DO NOT publish copyrighted material without the owners permission. If you copy news or articles include a link back to the original site. Threads/Posts may be deleted on request. No other links without permission.
BEFORE POSTING A QUESTION: Your question has probably been asked before, so please use the
SEARCH FUNCTION, as we grow tired of answering the same question again and again.
Results 1 to 2 of 2

Thread: HTML Question

  1. #1
    wb's Avatar
    wb is offline Win2Win Racing Club Member

    Join Date
    Apr 2005
    Location
    Éire
    Posts
    7,347
    Rep Power
    80

    HTML Question

    I'm trying to validate a simple document (It works fine in the browser) but Im interested as to why I get this message:


    Errors and Warnings
    Line 11, character 8:
    <p><h1>This is the heading</h1></p>
    ^Error: element h1 not allowed here; possible cause is an inline element containing a block-level element


    Why is a heading not allowed here? Seems like a simple piece of code to me

    Tada gan iarracht


  2. #2

    Join Date
    Jun 2003
    Location
    Gloucester, UK
    Posts
    4,307
    Rep Power
    71
    Because both the paragaph tag and the heading tags are block-level elements which can only contain inline elements. Your browser won't care, especially if it's IE, because it will gloss over most technical HTML errors. If you want to place the next line following your heading on a new paragraph, place the paragraph tag after the closing heading tag.

    .


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. HTML editors
    By wb in forum PC Help/Advice - 100% FREE
    Replies: 19
    Last Post: 22nd November 2007, 02:04
  2. Html
    By vegyjones in forum PC Help/Advice - 100% FREE
    Replies: 7
    Last Post: 5th January 2007, 14:59
  3. Another HTML question
    By wb in forum PC Help/Advice - 100% FREE
    Replies: 3
    Last Post: 1st December 2006, 12:58
  4. HTML Code Switched Off
    By TheGoodGuy in forum Forum Rules, Announcements & Information
    Replies: 12
    Last Post: 7th July 2006, 12:15
  5. HTML/Javascript Pop-Up Window
    By John in forum PC Help/Advice - 100% FREE
    Replies: 8
    Last Post: 26th July 2004, 15:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Free Tips | Betting Advice | UK Horse Racing Tips | Free Bets | Staking Advice | Horse Racing Systems | Horse Racing Lays | Laying System | UK Horse Racing Tips | lay betting