Recent Posts
Well this post is going to finish off the basic html section of these tutorials. After that there are another four or five advanced html tutorials, and then I’m going to bring it all together and actually create a webpage for a local cafĂ©.
For now, though, lets deal with:
Metatags
Metatags are designed to help search engines interact with your web page. These are placed in the <head> section of the web page. There are two main ones we will discuss:
<meta name=“ escription” content=”your page description”>
Many search engines use this metatag as their description of your website. They will normally only display 100 or 200 words, so it is good to keep this short.
<meta name=“keywords” content=“keyword1 keyword2 keyword3”>
The keyword metatag is used by some search engines to work out which sites are relevant to which search. Be warned, some search engines penalize you for having too many keywords.
And now, on to comments:
Comments
Comments are pieces of html code that can be added to your webpage in order to help you, or someone else, understand the code. They wont appear on the page itself, and wont affect it at all, but can be seen when you look at the source. They take the following form:
<!-Your comment here-->
And for the final part of this post, I will deal with:
Escape Codes
There are some characters that can’t be typed directly into html. Instead you have to use their escape code. These take the form of &code;. So, for example, to use a quotation mark you would type:
"
For the copyright sign you would type
©
There are lists of all the escape characters available on the internet.
Well that’s it for today. Next week we start the advanced course.
Adam
Today's lesson is going to introduce variables, which are used to store information within a program. At the moment we will explore three main forms: int, float and char.
Int stands for integer, which basically means any number without decimal points.
Float stands for a floating point number, which basically means a number with decimals.
Char stands for a single character.
Variables can be named anything, but cannot begin with numbers, or be a c keyword.
Defining variables
A variable must be defined before it is used, and this is done as follows:
int variablename;
Multiple variables can be defined at once:
int v1, v2, v3;
It is also possible to give a variable a value at the same time as defining it.
int v1 = 1;
The system for defining variables is the same with other variable types.
Integers can also be defined with other words, like short, long, unsigned short and unsigned long.
Short and long define the number of bytes used to store the integer and signed and unsigned decide whether positive or negative numbers can be stores.
So
unsigned short int v1;
Would define v1 as a short integer that cannot store signs.
Custom data types
You can also define your own data types. For example, rather than writing
unsigned short int v1;
You can define a data type that has these features with the typedef command, which takes the following form:
typedef datatype dataname;
So, in this case it would be:
typedef unsigned short int customtype;
and then to define v1 we would write
customtype v1;
We will discuss custom data types more later, but that is it for today.
Adam
Today I'm going to deal with frames. Frames are a controversial part of HTML web design, with many people feeling that they aren't a good design mechanism. However, I'll show you how to use them and then you can judge for yourself.
Frames divide the page into different sections. One major use for this is allowing you to have a menu down the left hand side and clicking on the options changes what is on the right hand side.
The first tag I will introduce is the frameset tag, which takes the following form.
<frameset division="something%, something%>
If you want to divide the page into two columns, each of which takes up 50% of the page you would write:
<frameset cols="50%,50%>
On the other hand if you wanted two rows you would type:
<frameset rows="50%,50%>
Either of these pieces of code will create two frames, but it wont add any content to either.
To add content to a frameset you use the: <frame src> tag. Your first use of this tag will define the contents of the first frame, and the second use will define the contents of the second frame (and so on).
This tag takes the following form:
<frame src="webpage.html">
As always, if the frames contents is in the same directory as webpage then you can just write the webpage name, but if it isn't you have to provide the whole URL.
So, lets create a new website, which we will call frames.html
Add the following code to it:
<html>
<head>
<title>Frames demonstration</title>
</head>
<frameset cols="25%,75%">
<frame src="lesson3.html">
<frame src="lesson4.html">
</frameset>
</html>
Note that the frameset tag is also closed by the </frameset> tag at the end.
Now, the next thing we'll do is make it so that when you click on a link in the left frame it opens it in the right one.
To do this we first need to give our right hand frame a name. So lets call it display. We do this with the following code:
<frame src="lesson4.html" name="display">
Now, we need to open lesson3.html and change the code below:
<a href="lesson1.html">This is the first lesson we learned</a><br>
<a href="lesson2.html">This is the second lesson we learned</a><br>
<a href="http://www.google.com">This is a link to Google</a>
<br>
<a href="extra.html">This links to the extra website</a><br>
<a href="extra.html#second">This takes us straight to the second part of extra</a>
To each link here we add the following code:
target="targetframe"
So the first link would become:
<a href="lesson1.html" target="display">This is the first lesson we learned</a><br>
Do this for all the links.
So lesson3.html would now look like:
<html>
<head>
<title>Lesson 3</title>
<head>
<body>
<a href="lesson1.html" target="display">>This is the first lesson we learned</a><br>
<a href="lesson2.html" target="display">>This is the second lesson we learned</a><br>
<a href=http://www.google.com target="display">>This is a link to Google</a>
<br>
<a href="extra.html" target="display">>This links to the extra website</a><br>
<a href="extra.html#second" target="display">>This takes us straight to the second part of extra</a>
</body>
</html>
Now, going back to our frames page we will try a few more things. Firstly, the use of the <noframes> tag.
This tag takes the following form.
<noframes>
<body>Message<body>
</noframes>
The purpose of this tag is to provide an alternative page for people whose browsers do not display frames. So, we will add:
<noframes>
<body>This webpage requires frames<body>
</noframes>
To our frames page. So, in its final form our frames page should look as follows:
<html>
<head>
<title>Frames demonstration</title>
</head>
<frameset cols="25%,75%">
<frame src="lesson3.html">
<frame src="lesson4.html" name="display">
<noframes>
<body>This webpage requires frames<body>
</noframes>
</frameset>
</html>
Hope you found this useful.
Adam
This week I will post 4 posts, each on one 19th century philosopher. Today's post will be about Immanuel Kant, one of the most famous philosophers from this period.
Some of Kant's major philosophical treatise dealt with morals. Kant believed that rationality was the key law of morals, and that all morals could be defined by reason. He believed that we should evaluate actions by thinking whether everything acting this way would lead to a contradiction. [ Click here to read more ]
Today I am going to do a brief introduction to the C programming language. To complete this lesson you will need a compiler. I will be using bloodshed dev (http://www.download.com/Bloodshed-Dev-C-/3000-2069_4-10019857.html) and the tutorials will assume you are too. This is going to teach you how to write a simple hello world program.
Getting started [ Click here to read more ]
Today I'm going to deal with website backgrounds and at this point I am going to make a warning. This basic html faq is aiming to teach you how to put up a very basic website. However, that means it ignores some of the recommended ways to do things for the sake of simplicity. In the intermediate section of these tutes style sheets are used, and they are better then the following background tags.
Unlike previous lessons we wont be creating a new website this week. Instead, I suggest you go back to previous weeks and play with their background colours or add background pictures. [ Click here to read more ]
Today's post will be about the possible applications of chaos theory.
Chaos theory has obvious applications in the world, as most real world situations are chaotic, with none chaotic theories of physics normally approximating the real situations. Examples of where it is useful include biological systems, physical systems and economics. [ Click here to read more ]
Today's post will deal with the history of chaos theory. It is the fourth part of my bluffer's guide to chaos theory.
In the first post we discussed how Edward Lorentz helped form the field, by showing that small changes in initial conditions can have large impacts. This idea, which has been called the butterfly affect, was a major change of viewpoint for many in the scientific community. [ Click here to read more ]
Today's post is going to be about fractals, which are an important aspect of chaos theory.
A fractal is technically defined as an object whose Hausdorff-Besicovitch dimension is greater than its topological dimension, but a common definition is a shape that appears similar at large levels of magnification. [ Click here to read more ]
|
|
|
Comment by AdamB
on A history of western philosophy 4
Not really, you're right, I misspelled it.
Adam