Simple (first) web template

Code:
@font-face { 
	font-family:'delicious'; 
	src:url(fonts/delicious.otf); 
}
useless


Code:
	margin:0 auto 0 auto;
instead code it as
Code:
margin: 0 auto;

Code:
	background-attachment:scroll;
	background-image:url(images/bckground.gif);
	background-repeat:repeat-x;
Do it like this, it can save up for your time and the loading speed.
Code:
background:url(images/bckground.gif) scroll repeat-x;

Code:
<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/general.js"></script>
Place it before </head> instead at the bottom of the page.

I ran a checkup on The W3C Markup Validation Service ,no errors found.

Well, you have to keep it up.
 
Code:
	background-attachment:scroll;
	background-image:url(images/bckground.gif);
	background-repeat:repeat-x;
Do it like this, it can save up for your time and the loading speed.
Code:
background:url(images/bckground.gif) scroll repeat-x;
u talk about nano seconds. would u even prefer not to use any comments just the file isnt that large to download then? pff

although, his method is easier to read and understand, specially for newbies.
 
Code:
<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/general.js"></script>
Place it before </head> instead at the bottom of the page.


Actually, it is quite common practice to put javascript at the bottom of the page (despite it being against standards). Because if you put it in the header, it all needs to load before the page can actually display. Putting javascript at the bottom of the page allows the actual page to display while the javascript is still being loaded.
 
Actually, it is quite common practice to put javascript at the bottom of the page (despite it being against standards). Because if you put it in the header, it all needs to load before the page can actually display. Putting javascript at the bottom of the page allows the actual page to display while the javascript is still being loaded.

i would prefer to do it before the </head> and simply put it in a function that i call via onload. thats the most valid.
 
i would prefer to do it before the </head> and simply put it in a function that i call via onload. thats the most valid.

Yes, but if you're loading several other functions, that may be timely to load, it will slow down the load-time of your page. So instead of loading the page, and letting the user do what they want while the 'extras' are loading, you're stopping them from accessing the page until everything (even stuff they wont necessarily use) is being loaded.

Here is a small writeup about why you should put scripts below your page:

Best Practices for Speeding Up Your Web Site
 
say what?
What talking you!?

Anyway, why the hell you need that script when its completely pointless

u talk about nano seconds. would u even prefer not to use any comments just the file isnt that large to download then? pff

although, his method is easier to read and understand, specially for newbies.
Hey you should improve a lot more before posting this
 
Oh my god. I don't give a **** about files or how they're scripted/wrote if that works fine without bugs that can be exploited or brick. Get the servers that is able to handle the website. That's it.
 
Hey you should improve a lot more before posting this
problems with my articulation? Go and cry at your mum.

Yes, but if you're loading several other functions, that may be timely to load, it will slow down the load-time of your page. So instead of loading the page, and letting the user do what they want while the 'extras' are loading, you're stopping them from accessing the page until everything (even stuff they wont necessarily use) is being loaded.

Here is a small writeup about why you should put scripts below your page:

Best Practices for Speeding Up Your Web Site
so, i would let php manage what will be load and what not just by using more than one js file. (to prevent loading useless stuff)
but at the end, you are right, even if im not a fan of that. your method is just not recommend on stuff that rly must be load before but i think your method is recommend if we got plenty java script to load.
btw, thx for the link =)

im just not sure, its w3c conform to put style tags below the </html> lol.
 
Last edited:
Back