Sunday, December 12, 2010
First Assignment
Create a webpage advertising a product. Make sure you use headings, font alignment, and <FONT> tags.
Monday, April 26, 2010
Formatting Tags: Beginner HTML
If all websites in this world were consisting of just plain old text, the world would not be a good place for Youtube or Facebook. There are several other tags that websites use to make websites more interesting.
To start, we have the bold tag. This tag is noted with the <B> and </B> tags. We also have the italics and underline tags. I bet you can guess the tags for them. (Hint: Look in Word or any other processing program.)
There are also tags used to align text.
This is the standard left alignment. You do not need to use any tags for this because this is assumed by computers to be the default alignment.
This is right alignment. In order to make this happen, you need to put the attribute ALIGN="RIGHT" into the <P> tag. Close the paragraph tag when you are done. These can be used for sentence translations or any other way you wish.
This is center alignment, denotated by the <CENTER> and </CENTER> tags. As with the right alignment, you can also put it as an attribute in the <P> These are good for forms because everything is aligned along the center of the page. This is also good for headings. For instance:
Hello!
Fill out this form:
First name:
Last name:
In addition to this, we can change the color, size, and face using the <FONT> container tag. There are many attributes, but the FONT tag is depricated in later versions of HTML. CSS is usually used for these suituations, which I will talk about later (not in this post).
Try to use these in your own Notepad documents suffixed .html. HAVE FUN!!!!!!
Monday, April 12, 2010
JavaScript: Beginner
You place JavaScript code between the <script language="JavaScript"> tag and the </SCRIPT> tag.
Here is an example of JavaScript code. This code would check to see if there is a number entered into a text box (or anything at all) and then divides the number by two before alerting it in an alert box. (text box and button not included)
<script language="JavaScript">
function doitforme()
{
if(Formname.textboxname.value.length == 0)
{
alert("You have nothing entered!")
} else {
var number = parseInt(Formname.textboxname.value)
if(isNaN(number))
{
alert("There is no number there!")
} else {
var newnum = number/2
alert("The new number is "+newnum+".")
}
}
}
You do not have to understand the code, just note how it is different from HTML. Remember this comes in the website.
Have fun with JavaScript! Good luck!
Basic HTML: Beginner
Here is the basic format of a website:
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
The <HTML> tag basically tells the computer to start compiling the code.
Any code between the <HEAD> and the </HEAD> tags is not seen in the main webpage. With the exception of the <TITLE> and </TITLE> tags, which give the webpage the title you see at the top or on the tabs, nothing is seen here. It will influence the website, though.
Anything in the <BODY> part of the website is seen. As a matter of fact, this is the main part of the website.
</BODY></HTML> ends the website.
Also, the tags with no backslashes open the tag, while the ones with backslashes close it.
All the rest of the code will be talked about in other sections. In the mean time, hasta luego!
