Go Back   Wiki NewForum > Career Forum > Tech Forum & Tutorial > HTML Forum & Tutorial

HTML Forum & Tutorial End-To-End Process HTML / XHTML / CSS

Views: 1195  
Thread Tools Rate Thread Display Modes
Old 08-09-2010, 12:23 PM
bholas bholas is offline
Award Winner
Join Date:
Apr 2010
Posts: 5,181
Default How to specify font styles for text inside tables, the easy way

If you're using font tags inside large tables to change the style of the text inside cells, you maybe making your pages larger than necessary.
Let's look at the following sample table. Note how the FONT tags are being used to set the font style of text inside each cell. If you have a large table, these font style tags could multiply the size of your page, specially if the text inside the cells are smaller than the font tags.

test 1

test 2

test 3

test 4

Listing #1 : HTML code. Download tblcss1.html (0.22 KB).

If your visitors are using Cascading Style Sheets enabled browsers such as {X_CSSBROWSERS} or compatible, you could use the TD{font-family: Arial; font-size: 10pt;} style sheet tag as follows. Doing so will make text inside all TD tags use the specified font face and other specified attributes such as the font size.

test 1
test 2
test 3
test 4

Listing #2 : HTML code. Download tblcss2.html (0.29 KB).

Reply With Quote

website tips

New topics in HTML Forum & Tutorial

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2019, vBulletin Solutions, Inc.