link

A link is the "address" to a document (or a resource) on the web.

Hyperlinks, Anchors, and Links

In web terms, a hyperlink is a reference (an address) to a resource on the web. Hyperlinks can point to any resource on the web: an HTML page, an image, a sound file, a movie, etc. An anchor is a term used to define a hyperlink destination inside a document.
The HTML anchor element <a>, is used to define both hyperlinks and anchors.
We will use the term HTML link when the <a> element points to a resource, and the term HTML anchor when the <a> elements defines an address inside a document.


An HTML Link

Link syntax:
<a href="url">Link text</a> 
The start tag contains attributes about the link. The element content (Link text) defines the part to be displayed.
Note: The element content doesn't have to be text. You can link from an image or any other HTML element.


The href Attribute

The href attribute defines the link "address".
This example defines a link to http://mhabibie.blodspot.com:
<a href="http://mhabibie.blogspot.com/">Visit Habibie's blog!</a> The code above will display like this in a browser:
Visit Habibie's blog!


The target Attribute

The target attribute defines where the linked document will be opened. The code below will open the document in a new browser window:
 example:
<a href="http://mhabibie.blogspot.com/" target="_blank">Visit Habibie's blog!</a> 

The name Attribute

When the name attribute is used, the <a> element defines a named anchor inside a HTML document.
Named anchor are not displayed in any special way. They are invisible to the reader.
Named anchor syntax:
<a name="label">Any content</a> The link syntax to a named anchor:
<a href="#label">Any content</a> The # in the href attribute defines a link to a named anchor.


Basic Notes - Useful Tips

Always add a trailing slash to subfolder references. If you link like this: href="http://mhabibie.blogspot.com/html", you will generate two HTTP requests to the server, because the server will add a slash to the address and create a new request like this: href="http://mhabibie.blogspot.com/html/"
Named anchors are often used to create "table of contents" at the beginning of a large document. Each chapter within the document is given a named anchor, and links to each of these anchors are put at the top of the document.
If a browser cannot find a named anchor that  has been specified, it goes to the top of the document. No error occurs.

Read More..

HTML format and style

Big strong small del insert
These are part of formating tag that use in html.
You use <i> for italic. <b> for bold. <big> big. <small> for small. <sub> for subscript like H2O. <sup> for superscript like x2 + y2.

You can use <style> to modify you document. example
<p style="font-family:verdana;color:red">
This text is in Verdana and red</p>

This text is in Verdana and red

Read More..

html tutorial basic

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 markup tags are usually called HTML tags

HTML tags are keywords surrounded by angle brackets like <html>
HTML tags normally come in pairs like <b> and </b>
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.
example:


<html>

<head>
<title>Title of your document</title>
</head>

<body>

Your content is here

</body>
<html>

The text between <html> and </html> describes the web page.
The text between <head> and </head> is your web description head.
The text between and is the visible page content
<>

HTML uses tags like <b>, <u> and <i> for formatting output, like bold, italic text or underline text.
These HTML tags are called formatting tags.

For formatting your web, you should be better using CSS to format your web. we'll study about CSS in next time.

Read More..
 

Mhabibie's web | Mhabibie's BLog