Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

HTML Tables problem ?

Options
  • 25-03-2012 11:09am
    #1
    Closed Accounts Posts: 3,596 ✭✭✭


    Hi
    Im designing a site for a project in college, Im having a problem when I wrap my text in a table, the text inside it turns bold when I havent a bold tag any where in it, heres the code . . . . .

    <TABLE WIDTH ="745"><th>
    <div align="justify"><FONT FACE="Ariel"> my text goes here</div></TABLE></font>



    No matter what font style I use is always turns bold, anyone any ideas why this is happening ?


Comments

  • Registered Users Posts: 11,980 ✭✭✭✭Giblet


    You have an unclosed <th> tag, and the font tag isn't closed correctly, you have the order wrong.

    I'd recommend you don't put styling mixed with HTML, but use an external CSS style sheet instead. The HTML you are using is also pretty old, I would take a look at some newer standards.


  • Closed Accounts Posts: 3,596 ✭✭✭threein99


    Giblet wrote: »
    You have an unclosed <th> tag, and the font tag isn't closed correctly, you have the order wrong.

    I'd recommend you don't put styling mixed with HTML, but use an external CSS style sheet instead. The HTML you are using is also pretty old, I would take a look at some newer standards.

    We have to use this html for this, what do you mean I shouldnt use styling mixed with html ? Im a bit clueless about this sort of stuff


  • Closed Accounts Posts: 20,759 ✭✭✭✭dlofnep


    He means mixing regular old HTML with <div> tags. Go to htmlgoodies.com - there's a good HTML primer on there. Go through it, and you'll be fine.


  • Closed Accounts Posts: 3,596 ✭✭✭threein99


    So can anyone tell me why my text is turning into bold ? :o


  • Closed Accounts Posts: 20,759 ✭✭✭✭dlofnep


    Because text in a <th> tag will be bold by default.

    Use <td> instead of <th>, and close your tags! Anything you open, you must close.


  • Advertisement
  • Closed Accounts Posts: 3,596 ✭✭✭threein99


    dlofnep wrote: »
    Because text in a <th> tag will be bold by default.

    Use <td> instead of <th>, and close your tags! Anything you open, you must close.

    Oh right now I get you thanks a million


  • Registered Users Posts: 11,980 ✭✭✭✭Giblet


    And do so in the right order, the last tag you open is the first one to be closed.

    EG:
    <div><p></div></p> is wrong!

    <div><p></p></div> is correct.


  • Closed Accounts Posts: 3,596 ✭✭✭threein99


    Giblet wrote: »
    And do so in the right order, the last tag you open is the first one to be closed.

    EG:
    <div><p></div></p> is wrong!

    <div><p></p></div> is correct.

    Cheers thats helped alot


  • Closed Accounts Posts: 20,759 ✭✭✭✭dlofnep


    Think of it this way in terms of order of tags.

    <1><2><3><4>blah</4></3></2></1>


  • Closed Accounts Posts: 3,596 ✭✭✭threein99


    Thanks both of you, tables are pretty handy once you work out how to use them properly


  • Advertisement
  • Registered Users Posts: 11,980 ✭✭✭✭Giblet


    Now the bad news. Only use them for tabulated data, not layout. They aren't too flexible once defined, and they add a lot of markup.


  • Registered Users Posts: 15,065 ✭✭✭✭Malice


    You've also got a typo in your font declaration. "Ariel" should be "Arial".


Advertisement