Submit Your Article Forum Rules

Results 1 to 4 of 4

Thread: <h> tags

  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    16

    <h> tags

    I want to add <h> tags on my site. I set the <h> tags up in the cascading style sheet. When I try adding the <h> tag into the html I notice that it creates extra space between the copy with the <h> tag and the next line of copy. Is there anything that can be done so that the <h> tag doesn't create that extra space between the lines?
    postUre

    FitCare Products
    Hidden Content

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    36
    Add the following to your <hn> declarations:

    padding: 0;
    margin: 0;

    Headings, by default, have the whitespace added to them as there usually is space between copy and headings in most instances.
    Ooooooh, Guy Like!
    Hidden Content

  3. #3
    Junior Member
    Join Date
    Jan 2005
    Posts
    16
    what do you mean by "declarations" ?

    Thank you.
    postUre

    FitCare Products
    Hidden Content

  4. #4
    Senior Member Narasinha's Avatar
    Join Date
    Aug 2003
    Posts
    230
    Quote Originally Posted by postUre
    what do you mean by "declarations"?
    The declarations are where you "declare" the attributes of the particular tags within the Cascading Style Sheet.

    In the style sheet, you probably have something like this for your header tags:

    Code:
    h1  {font-weight: bold;
        font-size: 180%;
        text-align: center;
        color: #333366;
        font-family: "Times New Roman", Times, serif}
    To control the space added above and below the heading, you need to use padding and/or change the margins. Add the information to your style sheet like this:

    Code:
    h1  {font-weight: bold;
        font-size: 180%;
        padding: 0 0 0 0;
        margin: 0 0 0 0;
        text-align: center;
        color: #333366;
        font-family: "Times New Roman", Times, serif}
    You can specify the margin (spacing outside the object) or padding (spacing inside the boundaries of the object) using whatever units you prefer, such as pixels (i.e. 4px). If you want all four sides to have the same value, you can specify it just once (i.e. margin: 4px). If you want to use different values for each side, specify all four values, clockwise, starting from the top. So, specifying margin: 4px 0 4px 1em; would give you margins of 4 pixels on top and bottom, none on the right, and 1 em unit on the left.

Similar Threads

  1. title and meta tags outside of header tags
    By supernatural_247 in forum Search Engine Optimization Forum
    Replies: 8
    Last Post: 02-25-2007, 05:54 PM
  2. DC meta tags why repeated meta tags
    By Steven1976a in forum Search Engine Optimization Forum
    Replies: 1
    Last Post: 03-19-2006, 02:05 PM
  3. Meta tags what are DC.tags?
    By Steven1976a in forum Search Engine Optimization Forum
    Replies: 4
    Last Post: 07-29-2005, 01:52 AM
  4. Keyword Tags -- Same for Whole Site, or Unique Tags per Page
    By jawn_tech in forum Search Engine Optimization Forum
    Replies: 5
    Last Post: 08-16-2004, 05:21 PM
  5. Meta Tags / Alt Tags/robots is confusing
    By CaronWorldWide in forum Search Engine Optimization Forum
    Replies: 2
    Last Post: 08-11-2004, 01:20 PM

Posting Permissions

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