Skip to main content
nigelh70638339
Inspiring
November 21, 2017
Answered

Fatal error with code in DW CS6

  • November 21, 2017
  • 4 replies
  • 1178 views

I ran a few new pages through the Validator and it highlighted this section of code with a Fatal Error.

Can someone please help as it is driving me nuts. I am using CS6.

<table>

   

         <caption><h1>

               Booster Packs<br></h1>

               <h4>& various ad and promo cards</h4><br>

               <h5>Additional info: Marc Brooksbank</h5>

         </caption>

              

            <tr>

         

                <h3><th id="allzombiesmustdiesmad">All Zombies Must Die! (2011) (England)</th></h3>

                <h3><th id="allzombiesmustdierusher">All Zombies Must Die! (2011) (England)</th></h3>

                <h3><th id="allzombiesmustdieswat">All Zombies Must Die! (2011) (England)</th></h3>

                <h3><th id="arthurweasley">Arthur Weasley (2007) (England)</th></h3>

                <h3><th id="asterix">Asterix (2009) (German)</th></h3>

              

                </tr>

Any help greatly appreciated!

    This topic has been closed for replies.
    Correct answer B i r n o u

    The easiest way to explain what it is is to let you see the site

    www.ultimate-top-trumps.co.uk

    In the process of dragging it into the modern age and out of the stone age!


    yes you can use LIST for that purpose

    <ul>

    <li></li>

    <li></li>

    <li></li>

    </ul>

    each LI will contain all the needed informations , and you can structure each items inside the LI as you like, because the LI tag can contain any tags

    li – list item - HTML5

    4 replies

    B i r n o u
    Legend
    November 21, 2017

    just curious and it is a question concerning the TABLE tag,

    are you displaying tabuled data ? like a spread sheet ? of is it something else ?

    nigelh70638339
    Inspiring
    November 21, 2017

    It is a table displaying packs of cards and when the images are clicked then you get to see all of the cards and any information. It is a collectors site.

    B i r n o u
    Legend
    November 21, 2017

    so that's not a tabuled data approach... why are you using TABLE, can't you use any type of list of elements ?

    Jon Fritz
    Community Expert
    Community Expert
    November 21, 2017

    The <h3> tags can't wrap <th> tags. They need to be moved inside the <th> tags and placed around the text itself.

    <th id="allzombiesmustdiesmad"><h3>All Zombies Must Die! (2011) (England)</h3></th>

                    <th id="allzombiesmustdierusher"><h3>All Zombies Must Die! (2011) (England)</h3></th>

                    <th id="allzombiesmustdieswat"><h3>All Zombies Must Die! (2011) (England)</h3></th>

                    <th id="arthurweasley"><h3>Arthur Weasley (2007) (England)</h3></th>

                    <th id="asterix"><h3>Asterix (2009) (German)</h3></th>

    EDIT: Whoops, I'm wrong, the <h3> can't be inside <th> either. Doing that will get rid of the "fatal error", but it brings up new ones.

    Instead of adding <h3> (a header tag) to the <th> (table header) just style the <th> the way you want using css...

    th {

         property:value;

         property:value;

    }

    nigelh70638339
    Inspiring
    November 21, 2017

    THAT, is what I have been getting wrong! Just changed it and the CSS surrounding the H3's and it now seems to get past the fatal error.

    Thank you all I will continue to rectify my errors!

    Thank you everyone, you came to my rescue yet again!

    Nancy OShea
    Community Expert
    Community Expert
    November 21, 2017

    #1 I don't know why you're using table for this but your structure is not correct.

    <table>

         <caption>Table Caption </caption>

    <tr>

         <th id="one">Heading</th>

         <th id="two">Heading</th>

         <th ide="three">Heading</th>

    </tr>

    <tr>

         <td>Something</td>

         <td>Something</td>

         <td>Something</td>

    </tr>

    </table>

    #2 IDs are unique identifiers and can be used only 1 x per page.

    <th id="allzombiesmustdiesmad">

    Nancy O'Shea— Product User & Community Expert
    B i r n o u
    Legend
    November 21, 2017

    you cannot insert any tag in any tags... I mean some tags don't have all the others tags as permited content

    so TR doesn't accept H3... as you can verify here

    tr – table row - HTML5