please help--Basic question about H1 format

Discussion in 'HTML & Website Design' started by think_tom, Mar 7, 2009.

  1. #1
    ...Bought a small site, trying to improve it. It's in html. Other than the home page, there appear to be no H1 tags on the site, ie on any other pages. Before I manually put H1 tags on all pages of my site I want to make sure that I have the format correctly on the first page!
    Please let me know if this is proper html:

    <tr><td class="XSP_MAIN_PANEL"><H1 class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 10pt"><STRONG><FONT face=Arial color=darkred><SPAN style="FONT-SIZE: 10pt">KEYWORD | Page Title</SPAN></STRONG></FONT></SPAN></H1>

    Thanks very much for any help you can give me folks. ---Tom
     
    think_tom, Mar 7, 2009 IP
  2. MikeHayes

    MikeHayes Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    Looks ok to me. Question, why don't you move all the CSS stuff and embed it in the <head>? It'd make the (html) coding clearer for any changes.

    Mike
     
    MikeHayes, Mar 7, 2009 IP
    think_tom likes this.
  3. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #3
    You should really style the h1 tag using css with an attached stylesheet. There should only be one h1 tag per page.
     
    mjewel, Mar 7, 2009 IP
  4. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #4
    You've got two <SPAN style="FONT-SIZE: 10pt"> elements. Why not add the styles to the css class MsoNormal? At the begining of your H1 you have a class=MsoNormal. If you only want they styles to affect H1 in the <td> then use .XSP_MAIN_PANEL .MsoNormal {MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; FONT-SIZE: 10pt; FONT-WEIGHT: Bold; FONT-FAMILY: Arieal; COLOR: Darkred;}
     
    qazu, Mar 8, 2009 IP
  5. think_tom

    think_tom Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks all of you-- qazu, can I just replace the line of html in my original post with your line above? If so, I'm not clear on where the KEYWORD | Page Title would go in your code.
     
    think_tom, Mar 8, 2009 IP
  6. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #6
    The best way to do it is to just create a file called anyname.css and put it in your root folder with your index page.

    Then place this code in your header:

    <link rel="stylesheet" href="/anyname.css" type="text/css" media="all" />

    In the css file, put:

    h1 {
    font: bold 10pt arial, helvetica, sans-serif;
    text-align: justify;
    color: Darkred;
    margin: 0;
    }

    Then just place <h1>title or whatever you want</h1>
     
    mjewel, Mar 8, 2009 IP
    think_tom likes this.
  7. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #7
    No, you'd need to put it in a style sheet. If you don't have a separate .css file, then you'd put it in a <styles> element in your <head> element. Basically, you'd insert

    <style type="text/css">
    .XSP_MAIN_PANEL .MsoNormal {MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; FONT-SIZE: 10pt; FONT-WEIGHT: Bold; FONT-FAMILY: Arieal; COLOR: Darkred;}
    </style>

    between <head> and </head> in your html code

    Then, where you've got:
    <tr><td class="XSP_MAIN_PANEL"><H1 class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 10pt"><STRONG><FONT face=Arial color=darkred><SPAN style="FONT-SIZE: 10pt">KEYWORD | Page Title</SPAN></STRONG></FONT></SPAN></H1>

    you can use:
    <tr><td class="XSP_MAIN_PANEL"><H1 class="MsoNormal" >KEYWORD | Page Title</H1>
     
    qazu, Mar 8, 2009 IP
  8. think_tom

    think_tom Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks everyone very much. I tried gazu's method and it worked like a charm. Sincere thanks to all.
     
    think_tom, Mar 8, 2009 IP
  9. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #9
    Glad to have helped :)
     
    qazu, Mar 8, 2009 IP