SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can't get h1 tag right

    hi
    i'm trying to do some seo on my proxy http://myspaceproxy1.com/
    Now as you cansee on the bottom of the page, there is written, "MySpace Proxy 1, is a" and then th txt starts on a new line.
    I don't want it to be on a new line :s
    Can someone help fixing this please ?
    Thanks alot

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Location
    Utrecht (Netherlands, the)
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think you should use header tags in this case. You basically want some of the text in a paragraph to behave different. You should use span tags for this. give the span tags a class name and define those classes with a stylesheet:

    Code:
    <style type="text/css">
    .blaat { font-weight: bold; }
    .pipo { color: red; }
    </style>
    
    <p><span class="blaat">MySpace Proxy 1</span>, is a <span class="pipo">anonymous proxy</span> that lets you make indirect connections hiding all your personal information. With MySpace proxy, you can browse websites where you got banned. You can easily bypass webfiltersthat where set up by the school or company server you want to visit the site from. Also you have instatn acces to the cookies that where set up. Those are saved on MySpace Proxy1, and won't harm you at all. No need to search for long IP proxy list, with MySpace Proxy1 you can do everything that is possible with a proxy!</p>
    Hippopotomonstrosesquippedaliophobia - Fear of long words

  3. #3
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I came upon a similar problem yesterday. The designers for the site I'm working on have a heading with text like: "Get more with Living More". The words "Get more with" are orange and san-serif. The words "Living More" are blue, a serif font, and twice as big as "Get more with".

    Looks great in design, but to style with CSS is tricky. I can't seem to create this entire section as an h1 so I may need to make it a paragraph as CadmiumNL suggests. This seems to work against my web standards practice, but I'm not sure there's any alternative.

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use spans inside any element - it doesn't have to be a paragraph.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Location
    Utrecht (Netherlands, the)
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like Tyssen said:

    Code:
    <style type="text/css">
    h1 { color: orange; }
    .test { color: blue; font-size: 200%; }
    </style>
    
    <h1>Get more with <span class="test">Living More</span></h1>
    Hippopotomonstrosesquippedaliophobia - Fear of long words

  6. #6
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, i'm using the h1 tag for seo purpose, i know it's possible with span, but i want the words in the h1 tag to look important for search engines.
    So if someone knows how to do it with h1 ...
    thanks alot

  7. #7
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    come on, someone must know this :s

  8. #8
    Brevity is greatly overrated brandaggio's Avatar
    Join Date
    Dec 2005
    Posts
    1,424
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use the <h1> and the <span>. The spans are for styling hooks and the <h1> is for semantics (and is also a styling hook itself).

    It is that simple as previously explained.

    Example:
    <h1>My He<span id="textBlue">ader</span></h1>

  9. #9
    SitePoint Member maikel.gonzalez's Avatar
    Join Date
    Jun 2006
    Location
    Havana, Cuba
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a good practice:
    <style type="text/css">
    <!--
    #logo {
    background-image: url(http://myspaceproxy1.com/name.gif);
    background-repeat: no-repeat;
    background-position: left top;
    text-indent: -1000px;
    display:block;
    width:276px;
    height: 60px;
    }
    -->
    </style>
    <h1 id="logo">MySpace Proxy</h1>


    maikel.gonzalez

  10. #10
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Belgium
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah ok
    thanks lads


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •