www.webdeveloper.com
Results 1 to 4 of 4

Thread: How to change font size inside a table.

  1. #1
    Join Date
    Sep 2008
    Location
    Jackson MS
    Posts
    374

    How to change font size inside a table.

    I have a webpage that shows the math behind the payment for a loan InterestTheory.html. I am able to change the type size for ordinary text but how can I change it for the table entries where I show the algebra behind it?

    TIA

  2. #2
    Join Date
    Apr 2012
    Posts
    38
    To solve this by HTML you could replace:

    Code:
    <table>
    by

    Code:
    <table style="font-size: 25px;">
    Of course you can do this on separate cells or whatsoever as well.
    Or you could solve this by CSS but since you're asking it in the HTML forums I stick with this answer

  3. #3
    Join Date
    Jun 2004
    Location
    Tampa, Florida
    Posts
    77
    Granted you didn't ask a "CSS" question, but its the first thing that comes to my mind. You can assign whole tables, and also individual <td> tags to a class, like...

    <table class="defaultFont">

    and then where necessary override individual table cells with

    <td class ="someOtherFont">

    And then even within the table cell, you can use <div> or <span> tags tied to other CSS classes.

    You can look up the various ways of including CSS styles, but for the above, you might put something like this in the <head> portion of your page. If you're not used to this, note the "." before each class name..

    <style>
    .defaultFont
    {
    color: Maroon;
    font-family: "Comic Sans MS";
    font-size: 38px;
    font-style: italic;
    }
    .someOtherFont
    {
    color: Black;
    font-family: "Comic Sans MS";
    font-size: 20px;
    font-style: normal;
    text-decoration: none;
    }
    </style>

  4. #4
    Join Date
    Jan 2014
    Posts
    19
    For styling you have to go the css way.

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