The Basics

A large part of this blog is to be a helpful resource for me as a web designer and front-end programmer. How so? Because every time I wrangle an entire day of anguish over a silly coding problem I intend to post it here. That way I will have my very own resource to look back at! And maybe, just maybe, along the way, it will be helpful to you too!

Let’s start with the basics in my file here at work:

To link to a stylesheet:
<link href="PATHTOFILE.css" type="text/css" rel="stylesheet" media="MEDIA" />

“PATHTOFILE.css” is obviously the path to your CSS file, whether relative or absolute. “MEDIA” is what type of media your stylesheet addresses. Options include “screen” for viewing on a normal computer, “print” for when a user prints out your web site, and “handheld” for viewing on a mobile device.

To link to a javascript file:
<script src="PATHTOFILE.js" language="javascript" type="text/javascript"></script>

“PATHTOFILE.js” is the path to your Javascript file, whether relative or absolute.

To link to a favicon:
<link href="PATHTOFILE.ico" rel="shortcut icon"/>

“PATHTOFILE.ico” is the path to your favicon file, whether relative or absolute.

A JQuery ready command:
$(document).ready(function(){
});

This is the most basic JQuery command in which you stuff all other JQuery code into. It basically says “don’t run any of the code in here until the page is fully loaded, or ‘ready’.”

We’ll get more complex later, I promise.

This entry was posted in Code Samples and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>