Sunday, August 08, 2010

<body> Tag

Previously, I discussed about the basic tags used in HTML. And one of those tags is the Body Tag. Remember that the body tag holds the contents of your webpage. It contains the information that is shown on the browser. This is the most essential part of the code. Well, every tag used in HTML does contain attributes, or shall we say, properties. These properties define certain objects seen on the browser. It helps improve appearance of your webpage.

<html>
<head>
<title>Title of the Webpage</title>
</head>
<body>
Document contents…
</body>
</html>
 
Standard Attributes
 
Attribute
Value
Description
class classname Specifies a classname for an element
dir rtl
ltr
Specifies the text direction
id id Specifies a unique id for the element
lang language code Specifies a language code for the content of the element
style style definition Specifies an inline style for an element
title text Specifies extra information about the element
xml:lang language code Specifies a language code for the content in an element, in XHTML documents
 
 Optional Attributes
 
Attribute
Value
Description
text
#xxxxxx
rgb(x,x,x)
colorname
Specifies the default color of the text in a webpage
link
#xxxxxx
rgb(x,x,x)
colorname
Specifies the default color of unvisited links in a webpage
alink
#xxxxxx
rgb(x,x,x)
colorname
Specifies the color of an active link in a webpage
vlink
#xxxxxx
rgb(x,x,x)
colorname
Specifies the color of the visited links in a webpage
bgcolor
#xxxxxx
rgb(x,x,x)
colorname
Specifies the background color of a webpage
background
URL
Specifies a background image in a webpage
 
 
Event Attributes
 
Attribute
Description
onclick Script will run on mouse click
ondblclick Script will run on mouse double-click
onload Script will run once the webpage loads
onmousedown Script will run once mouse button is pressed
onmousemove Script will run once mouse pointer moves
onmouseout Script will run once mouse pointer moves out of the element
onmouseover Script will run once mouse pointer moves over an element
onmouseup Script will run once mouse button is released
onkeydown Script will run once a key is pressed
onkeypress Script will run once a key is pressed and released
onkeyup Script will run once a key is released
onunload Script will run once the webpage unloads
 

Wednesday, April 18, 2007

Basic HTML

Basic HTML


In order to create a webpage, you are going to use HTML (HyperText Markup Language) which is the basic language for creating webpages. Don't worry, this will be taught here. You are gonna be needing the utility software of Windows, which is Notepad.


To run Notepad, click on the Start button. Hover your mouse on All Programs and then look for the Accessories Folder and click Notepad from there. Or you may run notepad by pressing the Windows key + R and then type in "notepad".


Now that you've opened Notepad, you are ready to start coding.

Since we are using HTML, we must first type in the basic tag which is:

<html>
</html>

This tag indicates that we are using the HTML language. This must be included so that the browser recognizes that you are running a webpage. Failure to include this will make the browser ignore other codes you've used. It will only read the texts you typed in but not implement the codes you set. To assure quality of work, better not forget to place this tag.

As you've noticed, the tag has a pair. This indicates the boundary of your implemented tags. Most of the HTML tags are in pairs, so you better not forget to place their pairs. Improper placing of tags will result in inefficient work and will not be so precise.

You should also keep in mind indents. This is to make the source code readable in order for you to easily trace errors.

The next tag will be the Head tag:

<head>
</head>


This tag contains the basic information of the HTML file. It contains the Title tag or any other scripts that you would want to load to the page.

The Head tag contains the Title tag:

<title>
</title>


The Title tag may contain the webpage's title which can be viewed on the Title bar of the web browser. You can do this by simple placing a Title tag within the Head tag. Then type in the Webpage Title you want in between the Title tag like shown below:

<html>
<head>
<title>
Webpage's Title
</title>
</head>
</html>


The last tag we're going to discuss is the Body tag which contains all the contents that you can see in a web page.

<body>
</body>
All the contents of your web page must be placed within the Body tag.

There you have it. All the basic tags used in creating a web page. Create a web page using the codes below, use Notepad:

<html>
<head>
<title>
My First Webpage
</title>
</head>
<body>
Hello there! This is my first ever web page!
</body>
</html>

After typing the codes above, save it. Click on File and then Save As... Choose location where you want to save it and then type the filename with the HTML extension like one seen below.

<filename>.HTML

Sunday, April 15, 2007

Topic of the Month

Topic of the Month

This month of April, I'm gonna be teaching you folks on the basic HTML.

HTML (HyperText Markup Language), is the predominant
markup language for the creation of web pages. It is the language used in creating webpages you see on the web.

So stay updated on this topic folks if you want to learn more!

Tuesday, April 10, 2007

Welcome to the Computer Community...

I welcome you to my blog...

Here we will talk about computers. I will be posting topics that will help you on learning certain things about the IT world.

If ever you have suggestions, don't hesitate to email me at jbasalts@gmail.com