Results 1 to 5 of 5

Thread: [HTML] Question on titles

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,376

    [HTML] Question on titles

    By titles I mean at the top of alot of website that have little quick links like "Home" "About" "What's New?". How should I handle those? I'm sure I could do something like this:

    html Code:
    1. <head>
    2. <h1>Home | About | What's New?</h1></head>
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  2. #2
    Addicted Member
    Join Date
    Feb 2010
    Location
    Damascus - Syria
    Posts
    145

    Re: [HTML] Question on titles

    <h1> and anything appears on the page should be inside the body tag, after head

  3. #3
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: [HTML] Question on titles

    For links that align side by side, most people use an unordered list.

    Code:
    <ul id="navigation">
    <li><a href="">Link 1</a></li>
    <li><a href="">Link 2</a></li>
    <li><a href="">Link 3</a></li>
    <li><a href="">Link 4</a></li>
    </ul>
    Then you'll want to add the css to the list to make it appear properly

    Code:
    #navigation li
    {
    display: inline;
    list-style-type: none;
    }
    This is untested, but should work. You'll also want to add padding, and if you want the bar inbetween items, you'll need to use a border.

  4. #4
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: [HTML] Question on titles

    Quote Originally Posted by kfcSmitty View Post
    Then you'll want to add the css to the list to make it appear properly

    Code:
    #navigation li
    {
    display: inline;
    list-style-type: none;
    }
    This is untested, but should work. You'll also want to add padding, and if you want the bar inbetween items, you'll need to use a border.
    I would normally use inline-block instead of just inline. Inline-block gives more flexibility in being able to set a fixed-width of list items, which inline elements can't do.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  5. #5

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,376

    Re: [HTML] Question on titles

    <h1> and anything appears on the page should be inside the body tag, after head
    Thank you, I guess I just assumed they belong in the <head> tags.
    For links that align side by side, most people use an unordered list.
    I had no idea about unordered list, thanks for that example! As for the CSS, I'm trying to use just HTML for now to get a basic understanding.

    @tr333, Thank you for your input as well
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

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



Click Here to Expand Forum to Full Width