www.webdeveloper.com
Results 1 to 4 of 4

Thread: Different types of text

  1. #1
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104

    Different types of text

    I was wondering if there is a website that has html code for different types of text to use on your site? I don't want to use the plain text. I have looked around and all i can find is how to layout text. Any help would be apreciated.

  2. #2
    Join Date
    Nov 2002
    Location
    Essex / Kent, UK
    Posts
    89
    You shouldn't use the FONT element because it is no longer appreciated. Use CSS like so:

    <style type="text/css">
    h3 {
    font-family: times
    }
    p.sans {
    font-family: sans-serif
    }
    p {
    font-family: courier
    }
    </style>

    It's best to stick to the basic fonts found on every computer, for accessibility.

  3. #3
    Join Date
    Feb 2003
    Location
    IL
    Posts
    104
    Where at in the code would i put the text? And where at on my Scripts page?

  4. #4
    Join Date
    Nov 2002
    Location
    Essex / Kent, UK
    Posts
    89
    You can use CSS inside an element like so:

    <p style="font-family: sans-serif">

    OR

    You can put the script in the head of your document:

    <head>
    <title>This is the Title</title>
    <style type="text/css">
    h3 {
    font-family: times
    }
    p.sans {
    font-family: sans-serif
    }
    p {
    font-family: courier
    }
    </style>
    </head>

    OR

    You can link to a CSS file by putting this code into the header of your page:

    <link rel="STYLESHEET"
    href="css.css"
    type="text/css" />

    Example of your css.css file:

    h3 {
    font-family: times
    }
    p.sans {
    font-family: sans-serif
    }
    p {
    font-family: courier
    }

    Good CSS Resource: http://www.w3schools.com/css/
    Last edited by Tim158; 03-04-2003 at 09:39 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles