Welcome to WebmasterWorld Guest from 35.153.73.72

Forum Moderators: mack

Message Too Old, No Replies

HTML Tags

They are taking up too much room

     
2:43 am on Aug 19, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 18, 2004
posts:315
votes: 0


I am trying to reduce the size of my index page which is currently at 64,491 bytes. Using a site checker, I see that HTML tags are taking up 37,077 bytes.

How can I reduce that?

Thanks.

Jscriptor

5:06 am on Aug 19, 2004 (gmt 0)

Inactive Member
Account Expired

 
 


I would look into XHTML if you already aren't using it as instead of using tables and nested tables you can create the same designs with 30% less characters using XHTML and CSS. There a bunch of good site concening this if you look.
5:23 am on Aug 19, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 18, 2004
posts:315
votes: 0


How can I have a site without tables? Also, what exactly is CSS?

And thanks for replying.

5:47 am on Aug 19, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2002
posts:666
votes: 0


CSS is Cascading Style Sheets. CSS is a way of styling your html pages without adding unneccessary html elements.

This is an example of bloated html:

<p align="left"><font face="Arial, Helvetica, sans-serif"><strong>This is some text.</strong></font></p>
<p align="left"><font face="Arial, Helvetica, sans-serif"><strong>This is another paragraph of text.</strong></font></p>
<p align="left"><font face="Arial, Helvetica, sans-serif"><strong>This is the last paragraph of text.</strong></font></p>

Using CSS, you could display the above paragraph in this manner.

<style type="text/css">
p{
font-family: Arial, Helvetica, sans-serif;
text-align: left;
font-weight: bold;
}
</style>

<p>This is some text.</p>
<p>This is another paragraph of text.</p>
<p>This is the last paragraph of text.</p>

The css styles can be held in an external file and referenced by your html document, thus leaving you with simply:

<p>This is some text.</p>
<p>This is another paragraph of text.</p>
<p>This is the last paragraph of text.</p>

A good place to learn the basics is W3schools [w3schools.com] and you can always ask questions in the CSS Forum [webmasterworld.com] when you get into difficulties.

Css also allows you to layout a site without tables.

5:50 am on Aug 19, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 7, 2004
posts:933
votes: 0


CSS is Style Sheet (.css*)
There are use to define the layout of your page (font, margin, color, etc...). It is an external file to your HTML page and it greatly helps to reduce ugly <font color=#####> tags for example.

Google for Style sheet or CSS and get a tutorial or a list of CSS element and try it, or grab one from a website to see how it works.

5:52 pm on Aug 19, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Aug 18, 2004
posts:315
votes: 0


I use Microsoft Front Page and don't do any of the coding manually. Is there a way I can use CSS without going into the html code?

Thanks.

12:18 am on Aug 20, 2004 (gmt 0)

New User

10+ Year Member

joined:Apr 17, 2004
posts:14
votes: 0


Buz, you might try something like HTML Compressor. It is a freeware program that scrunches your html code to remove unnecessary characters and spaces and formating. While it does make the code hard for a human to read, it will load faster. The program makes a backup of your original page, in case you ever want to get into the html to tweak your page, with the old formating intact.
4:06 am on Aug 20, 2004 (gmt 0)

New User

10+ Year Member

joined:Aug 5, 2004
posts:38
votes: 0


THanks for a very nice simple explanation of CSS and xhtml. I was wondering myself.
1:29 pm on Aug 23, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 19, 2003
posts:136
votes: 0


Buz... MS FrontPage is notorious for bloated code. If you learn HTML, you can greatly reduce this manually. Without knowledge of the backend code being written, you lose a degree of control when writing your page.

There are programs available for writing style sheets, but again, you have zero control over the code that is being written. This leaves you in a similar position as using a wysiwyg editor for your HTML. You just never know what are going to get.

6:28 pm on Aug 23, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 22, 2004
posts:59
votes: 0


try the freeware program "HTML-Tidy", it also has a function to remove the unnesessary MS-Frontpage and MS-Word etc. Tags.
Should compress your code, and make it very easy to human-read if you configure the app correctly.
Your HTML will then also be HTML 4.01 compliant. (Frontpage can't do this properly...)
6:29 pm on Aug 23, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 22, 2004
posts:59
votes: 0


download the free html editor "HTML-Kit" it has the "HTML-Tidy" app included with a handy user interface - easy to use.

[chami.com...]

6:33 pm on Aug 23, 2004 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts:12172
votes: 61


I use Microsoft Front Page and don't do any of the coding manually. Is there a way I can use CSS without going into the html code.

There is, but there will be some limitations on what you can do through the WYSIWYG interface as opposed to switching over to HTML View and applying CSS manually.

Buz... MS FrontPage is notorious for bloated code.

Let's rephrase that to something more along these lines...

Buz... Beginning and Novice users of Microsoft FrontPage, Dreamweaver and other WYSIWYG programs are notorious for producing bloated code.
6:33 pm on Aug 31, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:July 14, 2004
posts:48
votes: 0


Perhaps this is a good place to ask a related question.

Is there a page size that you should never try to go over. I have two websites up, one averages about 6-7k and the other averages about twice that. I have one page that is essentially a long glossary page--not looked at often--that is about 35K!

Obviously the lower the better to increase your load speeds but I'm not sure if I'm doing fairly well at the 6-7K size or if I need to cut the size more to assure fast loads that don't turn people away. I've tried some "load speed testers" on the web and in programs but I get conflicting information.

9:33 pm on Sept 1, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 29, 2003
posts:944
votes: 0


One of the most common reasons for code that bloated when using FrontPage is copying and pasting stuff in from Word. Loads of people do it when they start out.

Better to copy from Word, to Notepad and then into FP and then format there. Its still not perfect, but will help a lot.

If you have been doing this, do not try to fix the pages, make new ones and replace them, its much quicker than trying to clean up the mess.