Professional Documents
Culture Documents
A uniform resource name (URN) functions like a person's name, while a uniform resource locator (URL) resembles
that person's street address. In other words: the URN defines an item's identity, while the URL provides a method for
finding it.
URLs
A URL is a URI that, in addition to identifying a web resource, specifies the means of acting upon or obtaining the
representation, specifying both its primary access mechanism and network location. For example, the URL
http://example.org/wiki/Main_Page refers to a resource identified as /wiki/Main_Page whose representation, in the
form of HTML and related code, is obtainable via HyperText Transfer Protocol (http) from a network host whose
domain name is example.org.
URNs
A URN is a URI that identifies a resource by name in a particular namespace. A URN can be used to talk about a
resource without implying its location or how to access it.
The International Standard Book Number (ISBN) system for uniquely identifying books provides a typical example of
the use of URNs. ISBN 0-486-27557-4 cites unambiguously a specific edition of Shakespeare's play Romeo and Juliet.
The URN for that edition would be urn:isbn:0-486-27557-4. To gain access to this object and read the book, its
location is needed, for which a URL would have to be specified.
Basic Tags of HTML
<HTML>
The <html> tag tells the browser that this is an HTML document.
The <html> tag represents the root of an HTML document.
The <html> tag is the container for all other HTML elements (except for the <!DOCTYPE> tag).
Attributes
Attribute Value Description
xmlns http://www.w3.org/1999/xhtml Specifies the XML namespace attribute (If you need your
content to conform to XHTML)
<head> Tag
The <head> element is a container for all the head elements.
The following elements can go inside the <head> element:
<title> (this element is required in an HTML document)
<style>
<base>
<link>
<meta>
<script>
<noscript>
Attributes
<base>
The <base> tag specifies the base URL/target for all relative URLs in a document.
There can be at maximum one <base> element in a document, and it must be inside the <head> element.
Attributes
href URL Specifies the base URL for all relative URLs in the page
target _blank Specifies the default target for all hyperlinks and forms in the page
_parent
_self
_top
framename
<body>
Attributes
<h1> to <h6>
Attributes
<font>
The <font> tag specifies the font face, font size, and color of text.
Optional Attributes
<basefont>
The <basefont> tag specifies a default text-color, font-size, or font-family for all the text in a document. It
is contained in head element.
Optional Attributes
Same as <font> tag.
<p>
The <p> tag defines a paragraph. Browsers automatically add some space (margin) before and after each <p>
element. The margins can be modified with CSS (with the margin properties).
Attributes
align
BR
Comment in HTML
Formatting Text (B, I, U, EM, BLOCKQUOTE, PREFORMATTED(attribute width), SUB,
SUP, STRIKE)
<a>
The <a> tag defines a hyperlink, which is used to link from one page to another.
The most important attribute of the <a> element is the href attribute, which indicates the link's destination.
By default, links will appear as follows in all browsers:
An unvisited link is underlined and blue
A visited link is underlined and purple
An active link is underlined and red
Attributes
Attribute Value Description
download filename Specifies that the target will be downloaded when a user clicks
on the hyperlink
href URL Specifies the URL of the page the link goes to
name section_name Not supported in HTML5. Use the global id attribute instead.
Specifies the name of an anchor
rel alternate Specifies the relationship between the current document and
author the linked document
bookmark
help
license
next
nofollow
noreferrer
prefetch
prev
search
tag
The following attributes: download, hreflang, media, rel, target, and type cannot be present if the href attribute is
not present.
Value Description
Email Links
mailto:
To create a link that starts up the user's email program and addresses an email to a specified email address, you use
the <a> element. However, this time the value of the href attribute starts with mailto: and is followed by the email
address you want the email to be sent to.
Example:
<a href="mailto:someone@example.org">Email Someone</a>
On the above you can see that an email link looks just like any other link but, when it is clicked on, the user's email
program will open a new email message and address it to the person specified in the link.
Linking to a Specific Part of the Same Page
At the top of a long page you might want to add a list of contents that links to the corresponding sections lower
down. Or you might want to add a link from part way down the page back to the top of it to save users from having
to scroll back to the top.
Before you can link to a specific part of a page, you need to identify the points in the page that the link will go to. You
do this using the id attribute (which can be used on every HTML element). The value of the id attribute should start
with a letter or an underscore (not a number or any other character) and, on a single page; no two id attributes
should have the same value. To link to an element that uses an id attribute you use the <a> element again, but the
value of the href attribute starts with the # symbol, followed by the value of the id attribute of the element you want
to link to.
Linking to a Specific Part of Another Page
If you want to link to a specific part of a different page (whether on your own site or a different website) you can use
a similar technique. As long as the page you are linking to has id attributes that identify specific parts of the page,
you can simply add the same syntax to the end of the link for that page. Therefore, the href attribute will contain the
address for the page (either an absolute URL or a relative URL), followed by the # symbol, and followed by the value
of the id attribute that is used on the element you are linking to.
<img>
The <img> tag defines an image in an HTML page.
The <img> tag has two required attributes: src and alt.
Note: Images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag
creates a holding space for the referenced image.
Tip: To link an image to another document, simply nest the <img> tag inside <a> tags.
Attributes
ALIGN, SRC, WIDTH, HEIGHT, ALT
Image Link
Creating Tables
Border
TH, TR
TD
CELLSPACING
CELLPADDING
WIDTH
COLSPAN
CAPTION
ALIGN
Frames
Percentage dimensions
Relative dimensions
Frame- Src
Frameborder
<NOFRAMES>
</NOFRAMES>;