bagi pemula belajar html
Sungguminasa Cyber Community :: Software dan Hardware :: Komputer (PC) :: ۞Software :: ۞Web Development/Programming
Halaman 1 dari 1
bagi pemula belajar html
HTML Tutorial
<a href="http://www.quackit.com/html/tutorial/">klik link ini</a>
About HTML
<a href="http://www.quackit.com/html/tutorial/introduction.cfm">About
Getting Started
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>HTML Tutorial Example</title>
</head>
<body>
<p>Less than 5 minutes into this HTML tutorial and
I've already created my first homepage!</p>
</body>
</html>
HTML Elements
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>HTML Tutorial Example</title>
</head>
<body>
<p>Less than 5 minutes into this HTML tutorial and
I've already created my first homepage!</p>
</body>
</html>
HTML Formatting
Headings
There is a special tag for specifying headings in HTML. There are 6 levels of headings in HTML ranging from h1 for the most important, to h6 for the least important.
Typing this code:
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
Results in this:
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Bold
You specify bold text with the <b> tag.
Typing this code:
<b>This text is bold.</b>
Results in this:
This text is bold.
Italics
You specify italic text with the <i> tag.
Typing this code:
<i>This text is italicised.</i>
Results in this:
This text is italicised.
Line Breaks
Typing this code:
<p>Here is a...<br />line break.</p>
Results in this:
Here is a
line break.
Horizontal Rule
Typing this code:
Here's a horizontal rule... <hr /> ...that was a horizontal rule Smile
Results in this:
Here's a horizontal rule... ...that was a horizontal rule Smile
Unordered (un-numbered) List
Typing this code:
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
Results in this:
* List item 1
* List item 2
* List item 3
Ordered (numbered) List
Note, that the only difference between an ordered list and an unordered list is the first letter of the list definition ("o" for ordered, "u" for unordered).
Typing this code:
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ol>
Results in this:
1. List item 1
2. List item 2
3. List item 3
HTML Links
Example HTML Code:
Visit the <a href="http://www.natural-environment.com/blog/">Natural Environment Blog</a>
This results in:
Visit the Natural Environment Blog
Hypertext references can use absolute URLS, relative URLs, or root relative URLs.
absolute
This refers to a URL where the full path is provided. For example, [You must be registered and logged in to see this link.]
relative
This refers to a URL where only the path, relative to the current location, is provided. For example, if we want to reference the [You must be registered and logged in to see this link.] URL, and our current location is [You must be registered and logged in to see this link.] we would use tutorial/index.cfm
root relative
This refers to a URL where only the path, relative to the domain's root, is provided. For example, if we want to reference the [You must be registered and logged in to see this link.] URL, and the current location is [You must be registered and logged in to see this link.] we would use /html/tutorial/index.cfm. The forward slash indicates the domain's root. This way, no matter where your file is located, you can always use this method to determine the path, even if you don't know what the domain name will eventually be.
Link Targets
You can nominate whether to open the URL in a new window or the current window. You do this with the target attribute. For example, target="_blank" opens the URL in a new window.
The target attribute can have the following possible values:
_blank Opens the URL in a new browser window.
_self Loads the URL in the current browser window.
_parent Loads the URL into the parent frame (still within the current browser window). This is only applicable when using frames.
_top Loads the URL in the current browser window, but cancelling out any frames. Therefore, if frames were being used, they aren't any longer.
Example HTML Code:
Visit the <a href="http://www.natural-environment.com" target="_blank">Natural Environment</a>
This results in:
Visit the Natural Environment
Named Anchors
You can make your links "jump" to other sections within the same page. You do this with named anchors.
To use named anchors, you need to create two pieces of code - one for the hyperlink (this is what the user will click on), and one for the named anchor (this is where they will end up).
This page uses a named anchor. I did this by performing the steps below:
1. I created the named anchor first (where the user will end up)
Example HTML Code:
<h2>Link Targets<a name="link_targets"></a></h2>
2. I then created the hyperlink (what the user will click on). This is done by linking to the name of the named anchor. You need to preceed the name with a hash (#) symbol.
Example HTML Code:
<a href="#link_targets">Link Targets</a>
This results in:
Link Targets
When you click on the above link, this page should jump up to the "Link Targets" section (above). You can either use your back button, or scroll down the page to get back here.
You're back? Good, now lets move on to email links.
Email Links
You can create a hyperlink to an email address. To do this, use the mailto attribute in your anchor tag.
Example HTML Code:
<a href="mailto:king_kong@example.com">Email King Kong</a>
This results in:
Email King Kong
Clicking on this link should result in your default email client opening up with the email address already filled out.
You can go a step further than this. You can auto-complete the subject line for your users, and even the body of the email. You do this appending subject and body parameters to the email address.
Example HTML Code:
<a href="mailto:king_kong@example.com?subject=Question&body=Hey there">Email King Kong</a>
This results in:
Email King Kong
Base href
You can specify a default URL for all links on the page to start with. You do this by placing the base tag (in conjunction with the href attribute) in the document's head.
Example HTML Code:
<head>
<base url="http://www.quackit.com">
</head>
HTML Images
<a href="http://www.quackit.com/html/tutorial">
<img src="http://www.quackit.com/pix/smile.gif"
width="100" height="100" alt="Smile" border="0" />
</a>
<a href="http://www.quackit.com/html/tutorial/">klik link ini</a>
About HTML
<a href="http://www.quackit.com/html/tutorial/introduction.cfm">About
Getting Started
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>HTML Tutorial Example</title>
</head>
<body>
<p>Less than 5 minutes into this HTML tutorial and
I've already created my first homepage!</p>
</body>
</html>
HTML Elements
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>HTML Tutorial Example</title>
</head>
<body>
<p>Less than 5 minutes into this HTML tutorial and
I've already created my first homepage!</p>
</body>
</html>
HTML Formatting
Headings
There is a special tag for specifying headings in HTML. There are 6 levels of headings in HTML ranging from h1 for the most important, to h6 for the least important.
Typing this code:
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
Results in this:
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Bold
You specify bold text with the <b> tag.
Typing this code:
<b>This text is bold.</b>
Results in this:
This text is bold.
Italics
You specify italic text with the <i> tag.
Typing this code:
<i>This text is italicised.</i>
Results in this:
This text is italicised.
Line Breaks
Typing this code:
<p>Here is a...<br />line break.</p>
Results in this:
Here is a
line break.
Horizontal Rule
Typing this code:
Here's a horizontal rule... <hr /> ...that was a horizontal rule Smile
Results in this:
Here's a horizontal rule... ...that was a horizontal rule Smile
Unordered (un-numbered) List
Typing this code:
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
Results in this:
* List item 1
* List item 2
* List item 3
Ordered (numbered) List
Note, that the only difference between an ordered list and an unordered list is the first letter of the list definition ("o" for ordered, "u" for unordered).
Typing this code:
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ol>
Results in this:
1. List item 1
2. List item 2
3. List item 3
HTML Links
Example HTML Code:
Visit the <a href="http://www.natural-environment.com/blog/">Natural Environment Blog</a>
This results in:
Visit the Natural Environment Blog
Hypertext references can use absolute URLS, relative URLs, or root relative URLs.
absolute
This refers to a URL where the full path is provided. For example, [You must be registered and logged in to see this link.]
relative
This refers to a URL where only the path, relative to the current location, is provided. For example, if we want to reference the [You must be registered and logged in to see this link.] URL, and our current location is [You must be registered and logged in to see this link.] we would use tutorial/index.cfm
root relative
This refers to a URL where only the path, relative to the domain's root, is provided. For example, if we want to reference the [You must be registered and logged in to see this link.] URL, and the current location is [You must be registered and logged in to see this link.] we would use /html/tutorial/index.cfm. The forward slash indicates the domain's root. This way, no matter where your file is located, you can always use this method to determine the path, even if you don't know what the domain name will eventually be.
Link Targets
You can nominate whether to open the URL in a new window or the current window. You do this with the target attribute. For example, target="_blank" opens the URL in a new window.
The target attribute can have the following possible values:
_blank Opens the URL in a new browser window.
_self Loads the URL in the current browser window.
_parent Loads the URL into the parent frame (still within the current browser window). This is only applicable when using frames.
_top Loads the URL in the current browser window, but cancelling out any frames. Therefore, if frames were being used, they aren't any longer.
Example HTML Code:
Visit the <a href="http://www.natural-environment.com" target="_blank">Natural Environment</a>
This results in:
Visit the Natural Environment
Named Anchors
You can make your links "jump" to other sections within the same page. You do this with named anchors.
To use named anchors, you need to create two pieces of code - one for the hyperlink (this is what the user will click on), and one for the named anchor (this is where they will end up).
This page uses a named anchor. I did this by performing the steps below:
1. I created the named anchor first (where the user will end up)
Example HTML Code:
<h2>Link Targets<a name="link_targets"></a></h2>
2. I then created the hyperlink (what the user will click on). This is done by linking to the name of the named anchor. You need to preceed the name with a hash (#) symbol.
Example HTML Code:
<a href="#link_targets">Link Targets</a>
This results in:
Link Targets
When you click on the above link, this page should jump up to the "Link Targets" section (above). You can either use your back button, or scroll down the page to get back here.
You're back? Good, now lets move on to email links.
Email Links
You can create a hyperlink to an email address. To do this, use the mailto attribute in your anchor tag.
Example HTML Code:
<a href="mailto:king_kong@example.com">Email King Kong</a>
This results in:
Email King Kong
Clicking on this link should result in your default email client opening up with the email address already filled out.
You can go a step further than this. You can auto-complete the subject line for your users, and even the body of the email. You do this appending subject and body parameters to the email address.
Example HTML Code:
<a href="mailto:king_kong@example.com?subject=Question&body=Hey there">Email King Kong</a>
This results in:
Email King Kong
Base href
You can specify a default URL for all links on the page to start with. You do this by placing the base tag (in conjunction with the href attribute) in the document's head.
Example HTML Code:
<head>
<base url="http://www.quackit.com">
</head>
HTML Images
<a href="http://www.quackit.com/html/tutorial">
<img src="http://www.quackit.com/pix/smile.gif"
width="100" height="100" alt="Smile" border="0" />
</a>
aanshori- Level I
- Jumlah posting : 73
Join date : 22.11.10
Age : 35
Lokasi : banjarmasin
Similar topics
» Belajar PHP - Belajar Framework
» Belajar CodeIgniter
» belajar Query Google Sama Dengan Google Hack
» Belajar CodeIgniter
» belajar Query Google Sama Dengan Google Hack
Sungguminasa Cyber Community :: Software dan Hardware :: Komputer (PC) :: ۞Software :: ۞Web Development/Programming
Halaman 1 dari 1
Permissions in this forum:
Anda tidak dapat menjawab topik
Mon 14 Feb 2011 - 11:19 by Reza
» [Ask]share cheat wallshot & hack title..
Thu 20 Jan 2011 - 9:15 by borjuaj
» @_VIMEDIA_@ Clan PB
Sun 16 Jan 2011 - 9:29 by otakmu
» One Hit World Boss 2011 | Ninja Saga
Tue 11 Jan 2011 - 18:12 by kalinas09
» Cheat 3 Elemen
Tue 11 Jan 2011 - 18:05 by kalinas09