Pages

Saturday, June 26, 2010

:: HTML Elements Part 3 ::

Normally when you create html pages , there will be have more than one paragraph and one line in a html page. So , its necessary for you to know how to make new paragraphs , new lines and break lines.

HTML Paragraph

Paragraphs are defined with the <p> tag. Do not forget the end / closing tag (</p>) . Most browsers still can display HTML correctly even if you forget the end / closing tag . But forgetting the end / closing tag can produce unexpected results or errors. For the future version of HTML will not allow you to skip the end / closing tag.

For example :

<html>
<head>
<title> The third lesson </title>
</head>
<body>
<p> This is the exampe using HTML Paragraph </p>
</body>
</html>

HTML Line Breaks

Use the <br/> tag if you want a line break (a new line) without starting a new paragraph. The tag does not have any HTML element. It has no end tag . Besides that , you can use <br> tag . Both tags will be used depend on situations . If you want to break the line , you will use <br/> tag. But if you want to use new line , you will use <br> tag . In XHTML , XML and future versions of HTML , HTML elements with no end tag or closing tag are not allowed. Even if <br> always work in all browser , writing <br/> instead is more future proof.

For example :

<html>
<head>
<title> The third lesson </title>
</head>
<body>
<p> This is the exampe using HTML Paragraph </p>
<br> This is the exampe using HTML Line Breaks <br/>
</body>
</html>

Now , you already learned and know about HTML Paragraph and Line Breaks.

Thursday, June 24, 2010

:: HTML Elements Part 2 ::

In this lecture , I would like to discuss about the <body> tags . There are many attributes can be applied in the <body> tags . These attributes will be added in start tag / opening tag <body> tag . Do not forget to include the values.. The coding should have both attribute/s and value/s.These attributes are optional. If you do not want to use any attribute , you can use the basic <body> tags.(<body></body>)

For example:

<html>
<head>
<title> The second lesson</title>
</head>
<body background = "image.jpg "> This is the contain of body </body>
</html>

Below are the list of attributes and values that can be added in start tag / opening tag <body> tag .

Optional Attributes

The <body> tag supports the following optional attributes:

Attribute Value Description
alink rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the color of an active link in a document
background URL Deprecated. Use styles instead.
Specifies a background image for a document
bgcolor rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the background color of a document
link rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the default color of unvisited links in a document
text rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the color of the text in a document
vlink rgb(x,x,x)
#xxxxxx
colorname
Deprecated. Use styles instead.
Specifies the color of the visited links in a document

Standard Attributes

The <body> tag supports the following standard attributes:

Attribute Value Description
class classname Specifies a classname for an element
dir rtl
ltr
Specifies the text direction for the content in an element
id id Specifies a unique id for an element
lang language_code Specifies a language code for the content in an element
style style_definition Specifies an inline style for an element
title text Specifies extra information about an element
xml:lang language_code Specifies a language code for the content in an element, in XHTML documents

Event Attributes

The <body> tag supports the following event attributes:

Attribute Value Description
onclick script Script to be run on a mouse click
ondblclick script Script to be run on a mouse double-click
onload script Script to be run when a document load
onmousedown script Script to be run when mouse button is pressed
onmousemove script Script to be run when mouse pointer moves
onmouseout script Script to be run when mouse pointer moves out of an element
onmouseover script Script to be run when mouse pointer moves over an element
onmouseup script Script to be run when mouse button is released
onkeydown script Script to be run when a key is pressed
onkeypress script Script to be run when a key is pressed and released
onkeyup script Script to be run when a key is released
onunload script Script to be run when a document unload

*I am not recommend users to use standard and event attributes..Its make complicated.I just want to show the attributes that available for start tag / opening tag <body> tag .

Briefly , the codings should be formulated in this form <body attribute = "value "> .For example <body background = "image.jpg ">.

Monday, June 21, 2010

:: HTML Elements Part 1 ::

In order to make your first website , you only need a notepad to start a website. For the first lecture , I would like to show you the basic of HTML.The most important html syntax is <html> tags . Everytime you created the html page, you have to ensure that you put <html> tags together in your code.

Below is the example coding that using <html> tags . To put other codes , you have to put its between <html> and </html>

<html>
<head><title>My Homepage</title></head>
<body>Hello world, this is my first website.</body>
</html>

*The green text is the additional codes that I put in html page. In this code , I use <head> tags and <title> tags. Both syntax require start tag / opening tag and end tag / closing tag same with <html> tags . Before running your website in web browser(i.e Internet Explorer,Mozilla Firefox) , save your works in .htm or .html extension.For example you save it as home.html.Now , you can see your work by using web browser.Good Luck !!

This is your result..(Screenshot)
Notice the title of your website enclosed between the <title> tags of your HTML file is shown on the top left of the page and is not included in the page. This is the title that will be shown to viewers when users search for your website on the search engines or when someone bookmarks your website. The page of your website only shows the texts between the <body> tags of your HTML codes.

Remember , <title> tags must be put between <head> tags like the example above. The <body> tags will be put after <head> tags.

In conclusion, html codings are divided by two sections which are head and body section. The head section is start with <head> and end with <head> . While the body section is start with <body> and end with <body> . Most of coding or tags will be put either in head or body section .

Sunday, June 20, 2010

:: Introduction to HTML ::

As the previous post , I already mentioned about the essentials for learning php. There are 5 essentials for learning php. At the beginning , I will focus about the basic of understanding html. I think we do not need to discuss details about html or advanced html. It is necessary to just understand and apply basic of html.But if you have an intention to study about it, you can learn its.The example of advanced html such as HTML 4.0, HTML Meta, HTML Scripts, HTML Entities, HTML URLs, HTML URL Encode, and HTML Webserver InsyaAllah , I will also put about Cascading Style Sheet(CSS) and Java Script. These two elements are the additional coding that can be put together in html files.

What is HTML?

HTML is a language for describing web pages.

  • HTML stands for Hyper Text Markup Language
  • HTML is not a programming language, it is a markup language
  • A markup language is a set of markup tags
  • HTML uses markup tags to describe web pages

HTML Tags

HTML markup tags are usually called HTML tags

  • HTML tags are keywords surrounded by angle brackets like
  • HTML tags normally come in pairs like and
  • The first tag in a pair is the start tag, the second tag is the end tag
  • Start and end tags are also called opening tags and closing tags

HTML Documents = Web Pages

  • HTML documents describe web pages
  • HTML documents contain HTML tags and plain text
  • HTML documents are also called web pages

The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page:

Create Or Edit HTML

The best way to learn html is by using a plain text editor (like Notepad) to create/edit HTML. However, professional web developers often prefer HTML editors like FrontPage or Dreamweaver, instead of writing plain text.

.
HTM or .HTML File Extension

When you save an HTML file, you can use either the .htm or the .html file extension. For example is home.htm or home.html.

HTML Elements

HTML documents are defined by HTML elements. An HTML element is everything from the start tag to the end tag. The start tag is often called the opening tag. The end tag is often called the closing tag.

HTML Element Syntax

* An HTML element starts with a start tag / opening tag
* An HTML element ends with an end tag / closing tag
* The element content is everything between the start and the end tag
* Some HTML elements have empty content
* Empty elements are closed in the start tag
* Most HTML elements can have attributes

Nested HTML Elements

Most HTML elements can be nested (can contain other HTML elements).HTML documents consist of nested HTML elements.

Friday, June 18, 2010

:: How to learn PHP ::

The essentials for learning PHP:
Learning a new language (programming or otherwise) can be a bit overwhelming. Many people just don't know where to start and give up before they even begin. Learning PHP is NOT as overwhelming as it might seem, I promise you. Just take it one step at a time, and before you know it you'll be off and running.

1.)
Basic Knowledge:
The first thing you need, before you start learning PHP, is a basic understanding of HTML. You can switch between PHP and HTML right in the same document. You can even run PHP from an HTML file.

2.)
Tools:
When creating PHP pages, you can use the same program you use to create your HTML pages. Any plain text editor will do. You will also need an FTP client to transfer files from your computer to your web hosting. If you already have an HTML website you most likely already use an FTP program.

3.)
The Basics:
Now you can finally get started learning PHP! The first thing you should read is our PHP Basics tutorial. This will take you through creating your first file, using variables, basic math, and basic IF statements (a form of logic).

4.)
Learning Loops :
Once you have mastered these skills, it is time to learn about loops. Loops repeat the same actions over and over again until a condition is met. There are several different types of loops which are explained in our Learning Loops tutorial.

5.)
PHP Functions:
Finally, you can learn to write your own custom functions. From here the sky is the limit... With a solid knowledge of these PHP basics, adding PHP functions to your arsenal when you need them will be easy.

Thursday, June 17, 2010

:: Introduction to PHP::

What is PHP?

  • PHP stands for PHP: Hypertext Preprocessor
  • PHP is a server-side scripting language, like ASP
  • PHP scripts are executed on the server
  • PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
  • PHP is an open source software
  • PHP is free to download and use

What is a PHP File?

  • PHP files can contain text, HTML tags and scripts
  • PHP files are returned to the browser as plain HTML
  • PHP files have a file extension of ".php", ".php3", or ".phtml"

What is MySQL?

  • MySQL is a database server
  • MySQL is ideal for both small and large applications
  • MySQL supports standard SQL
  • MySQL compiles on a number of platforms
  • MySQL is free to download and use

PHP + MySQL

  • PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)

Why PHP?

  • PHP runs on different platforms (Windows, Linux, Unix, etc.)
  • PHP is compatible with almost all servers used today (Apache, IIS, etc.)
  • PHP is FREE to download from the official PHP resource: www.php.net
  • PHP is easy to learn and runs efficiently on the server side

:: Muqaddimah ::

First, syukur yg xt'hingga kpd Allah dgn nikmat Islam dan kesihatan. Dgn izinNya , aku dpt menulis blog ni.. Tujuan sbnr aku wat blog ni utk diri aku sendiri..Dgn cara ni , aku blh bljr psl php dgn lbih mendalam..InsyaAllah , aku akn masukkn sume maklumat yg b'kaitan php ..Dah lame aku t'fikir nk bljr psl php tp xde mase yg ssuai utk bljr.. Aku rse ni la mase yg ssuai utk aku bljr php..Dpt jugak aku mengisi mase lapang aku..Smoga dgn usaha aku ni , dpt merealisasikn impian aku utk menjd php programmer suatu hari nnti...Slmat berjaya utk diriku!!