How to add H1 H2 tags to my main page?

Discussion in 'HTML & Website Design' started by pavelbarchuk, May 3, 2009.

  1. #1
    I own portlandsauto.com and it seems that i dont have the H1 H2 tags. Many people have been telling me to add them. When you add a H1 tag, the letters become big. So in the section where it says, cars under 10000, new cars and trucks, etc... How can i make them H2 tags and used cars for sale a H1 tag? Is it possible to just add some code or do i need to do some work with css?
     
    pavelbarchuk, May 3, 2009 IP
  2. Caden Grant

    Caden Grant Active Member

    Messages:
    294
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    You can do something like:

    <h1 style="font-size:18px; font-weight:bold;">Text Here</h1>

    Which is using css inside the tag. If you don't know CSS I suggest you go to www.tizag.com or something or www.w3schools.com.

    But, I don't see why you can't just use some CSS in your stylesheet..

    h1 { font-size: 16px; } and whatever else you want.
     
    Caden Grant, May 3, 2009 IP
  3. alfa_375

    alfa_375 Active Member

    Messages:
    445
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Follow as Caden said or else display your html code here so that people can make exact required advice to overcome your poblem.
     
    alfa_375, May 4, 2009 IP
  4. thsadmin

    thsadmin Notable Member

    Messages:
    4,889
    Likes Received:
    133
    Best Answers:
    1
    Trophy Points:
    240
    Digital Goods:
    2
    #4
    or just

    <h1>Text or Title</h1>
    <h2>Text or Title</h2>

    Obviously H1 is heading 1 and H2 is heading 2.
     
    thsadmin, May 4, 2009 IP
  5. brandon93s

    brandon93s Active Member

    Messages:
    798
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #5
    You said it already makes the text change size (browser defaults im assuming and not your css) so what is the issue here.

    Simply put: <h1>biggest text here</h1>
    <h2>2nd biggest text here</h2>
     
    brandon93s, May 4, 2009 IP
  6. pavelbarchuk

    pavelbarchuk Peon

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    <tr>
    <td valign=top>
    <table id="categories" cellpadding=2 cellspacing=2>
    <tr>
    {foreach from=$categories item=v}
    <td valign="top" width="{$width}" align=left>

    <table>
    <tr><td colspan=2><a href="index.php?cat={$v.id}" class="categ">{$v.name|capitalize}</a></td></tr>
    <tr><td valign="top">{if $v.picture}<a href="index.php?cat={$v.id}"><img src="{$live_site}/images/categories/{$v.picture}" alt="Used cars for sale in portland oregon" title="Used cars for sale in portland oregon"></a>{/if}</td>
    <td valign="top">
    <div id="categ_count">{$v.ads} {if $v.ads==1}{$lng.general.activead}{else}{$lng.general.activeads}{/if}
    {if $v.subcats}, {$v.subcats} {if $v.subcats==1}{$lng.general.subcat}{else}{$lng.general.subcats}{/if}{/if}</div>
    <div id="categ_description">{$v.description}</div>
    <div id="categ_button">
    <table cellpadding=0 cellspacing=0>
    <tr><td><img src="{$template_path}images/more-left.png" alt="Used cars for sale in portland oregon" title="Used cars for sale in portland oregon"></td>
    <td height=16 background="{$template_path}images/more-center.png" alt="Used cars for sale in portland oregon" title="Used cars for sale in portland oregon"><a href="index.php?cat={$v.id}" class="view_button">{$lng.general.view_ads}</a></td>
    <td><img src="{$template_path}images/more-right.png"alt="Used cars for sale in portland oregon" title="Used cars for sale in portland oregon" ></td>
    </tr></table>
    </div>
    </td></tr>
    </table>

    </td>

    {if $v.last_on_row}
    </tr>
    {if $v.crt_row < $no_rows}
    <tr>
    {section name=l start=1 loop=$no_cats_per_row+1 step=1}
    <td><div class="categories-top"><img src="{$template_path}images/pixel.gif" alt="Used cars for sale in portland oregon" title="Used cars for sale in portland oregon"></div></td>
    {if $smarty.section.l.index%$no_cats_per_row!=0}
    <td></td>
    {/if}
    {/section}
    </tr>
    {/if}

    <tr>
    {else}
    {if $v.index != $no_categories}
    <td class="categories-right"><img src="{$template_path}images/pixel.gif" alt="Used cars for sale in portland oregon" title="Used cars for sale in portland oregon"></td>
    {/if}
    {/if}
    {/foreach}

    </table>
    </td></tr>

    If you look at the homepage portlandsauto.com, you will see 6 categories, used cars for sale, used trucks for sale, etc... in green. When i add the h1 or h2 tags, the green text becomes extremely large. as of right now, i dont have a single h1 or any other tags, i want to make used cars for sale h1 tag and the others a h2 since used cars is the main one with the most content.

    Also, nevermind the alt and title tags here, the guy that did some work made them all the same...


    If you guys have the code to make it a h1 tag but without changing the text size, i would really appreciate it. thanks
     
    pavelbarchuk, May 4, 2009 IP
  7. PinoyEngine™

    PinoyEngine™ Well-Known Member

    Messages:
    298
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    145
    #7
    use this instead.

    <h1 style="font-size:18px; font-weight:bold;">Insert the green text here</h1>
     
    PinoyEngine™, May 4, 2009 IP
  8. oceaniajimmy

    oceaniajimmy Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    like this:
    <h1>your content1</h1>
    <h2>your content2</h2>
     
    oceaniajimmy, May 4, 2009 IP
  9. pavelbarchuk

    pavelbarchuk Peon

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks for all the advice. I added the h1 tags and the size to 12 and it works good, except all six categories are now h1 taged, is that a good thing or it doesnt make a difference?
     
    pavelbarchuk, May 4, 2009 IP
  10. bsherwood

    bsherwood Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    While using style="font-size:18px; font-weight:bold;" is good for demo purposes, you may want to move your CSS into an external file.
     
    bsherwood, May 4, 2009 IP
  11. Immaboy

    Immaboy Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Do take note, h1 have the largest font-size among others heading, font-size will get smaller as the number increases.
     
    Immaboy, May 6, 2009 IP