Professional Documents
Culture Documents
-
HTML & XHTML
HTML & XHTML has its own rules for web authors or web developers to
follow and is referred to web standards.
URL
Uniform Resources Locator (URL) is a unique address for a file that
resides on the Internet. URL is commonly known when a user enters
the URL of a home page in the web browsers address line. A URL can
be any file, such as an image file, a program, a javascript document or
style sheet document.
URL is composed of two forms absolute URL and relative URL. The
absolute URL is one that contains the name of the protocol and the
hostname. It is the one that points to a resource outside of your own
sites domain. The relative URL is one that contains only the name of
the path of a file. It is the one that points to a resources within the
same site.
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
http://www.mypage.com/index.html
index.html
../global.css
OPENING TAG
ATTIBUTE
CLOSING TAG
What is a Tag?
Tags are the basic units or building blocks of an HTML file (or code as
you may call it now since writing it may be referred to as coding, too).
Web pages are designed and HTML codes are made up of these tags –
they control how the HTML does its structuring laying out and
formatting.
There are so many tags and each has its own use. Some are used to
make your text appear in boldface, Italicized, underlined. Some are
used to make your text bigger, and some are on the contrary, to make
your text smaller. Some can put your text on the center or even on the
far right of the screen. Some can put images and videos to even spice
up your Web page. There are yet so many tags to be discussed so as for
now. let us start discussing on how tags are used.
Structure of a Tag
Tags are enclosed in angle brackets ( ‘<’ & ‘>’) and an example of
its is <!DOCTYPE html>.
</body>
</html>
Container tags have the start and end tags together with the content
empty tags stand alone and do not require end tags.
<p>This is a paragraph.</p>
<i>This is used to display italics</i>
<u>This is used to display underlined text</u>
<font> face=”Times New Roman” color=”red”>Red-colored
text written in Times New Roman.</font>
<br>
<hr>
<img src=”samplePic.gif”>
now that you know what tags are, you should know that the whole
HTML file is enclosed in <html></html>.
Here is an example of an HTML file, notice how the start and end of the
file has the appropriate HTML start and end tags.
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
<html>
<head>
<title>Jemma Inc</title>
<head>
<body>
This text is in <b>boldface</b>.
<br><br>
This text is <i>italicized</i>.
<br><br>
This text is <u>undelined</u>
</body>
</html>
HTML COMMENTS
(<head>)
<body>
<h1>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
<head>
<body>
<h1>
</head>
</body>
</html>
Body Tags
Can you recall that attributes are? Where are they placed?
Attributes provide additional information about the tag and is placed
on the start tag. Since container tags have start tags and the
<body></body> tag is a container tag, it contains attributes. These are
its attributes.
Example Explained
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
Attribute
Name definition Values
Aligning a Paragraph
You can align a paragraph by using the Paragraph Tag Pair <p
align=left>, <p align=right>, <p align=center>.
<html>
<head>
<title>Latest IT Books</title>
<html>
<head>
<title> Latest IT Books</title>
</head>
<body>
<font size="5" face="arial">
<p align=left>
This paragraph contains a lot of lines in the source
code, but the browser ignores it.
</p>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
<p align=center>
This paragraph contains a lot of space in the source
code but the browser ignores it.
</p>
<p align=right>
This paragraph contains a lot of spaces in the browser
ignores it.
</p>
</font>
<body>
</html>
Line Breaks
Have you noticed how your Web browser treats the white spaces
on you HTML file? Your Web browser ignores white spaces and pressing
Enter or the Return key does not actually create a new line on the
chunk of text on your Web page as seen on the code. It will create a
new line for the text that you want to appear on the next line.
<html>
<head>
<title> Latest IT Books</title>
</head>
<body>
<font size=”6” face=”arial”>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
Quoting Passages
You can place quotes in indented form and shrink it to be set
apart from the main paragraph by using the tag pair <blockquote>
</blockquote>.
<html>
<head>
<title>Poem</title>
</head>
<body>
<font size=”5”>
<p>This is an except from the poem Tree.</p>
<blockquote><font face=”Arial” size=”3”>
I think that I shall never see a poem as lovely as a tree
</blockquote>
</font>
</body>
</html>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
<!DOCTYPE html>
<head>
<title> the CENTER element</title>
</head>
<body>
<h1>
The CENTER element
</h1>
<center>
<p> Standards-Based Approach for Offering a Managed
Security Services in a Multivendor Network Environment.
<br />
By Kunjal Trivedi, Cisco System and Damien Holloway.
Juniper Networks
</p>
<p>
A standard-based approach helps service providers take
best advantage of the managed security service opportunity because it
increases the potential breadth and depth of the service offering.
Multivendor solutions are becoming the norm when deploying services
on an integrated backbone. Therefore, standards simplify deployment
and management, helping control operational costs and accelerating
time to market.
</p>
</center>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
</body>
</html>
<!DOCTYPE html>
<head>
<title>the ADDRESS element</title>
</head>
<body>
<h1>
the ADDRESS element
</h1>
<address>
Gino Franco Velasco<br />
Web Developer<br />
Philippines
</address>
</body>
</html>
<!DOCTYPE html>
<head>
<title> the DIVISION element</title>
</head>
<body>
<h1> the DIVISION element
</h1>
<div align=”left”>
<p>
The content using the LEFT ALIGNMENT attribute of the
division element.
</p>
</div>
<div align=”center”>
<p>
The content using the CENTER ALIGNMENT attribute of the
division element.
</p>
</div>
<div align=”right”>
<p>
The content using the RIGHT ALIGNMENT attribute of the
division element.
</p>
</div>
</body>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
</html>
<!DOCTYPE html>
<head>
<title> the PREFORMATTED element</title>
</head>
<body>
<h1>
The PREFORMATTED element
</h1>
<pre>
GOD’S BOUQUET
by Jerry Johnson
</body>
</html>
<html>
<head>
<title> the CITATION element<title>
</head>
<body>
<h1>
The CITATION element
</h1>
An article from the Wall Street says:
<p>
The Gates Foundation said it still believes microbicides will
prove valuable in fighting the spread of AIDS. “ <p>It’s a
disappointment.” <cite>Nick Hellman. The Gates Foundation’s interim
director of HIV/AIDS and Tuberculosis</cite>. said in an interview. He
noted that developing drugs is a “long, tortuous road.” but said “we
have to proceed, stay the course and learn more lessons about what is
required for the optimum microbicide product.”
</p>
<body>
<html>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
<html>
<head>
<title> the SUPERSCRIPT element</title>
</head>
<body>
<h1> the SUPERSCRIPT element </h1>
<p>
` MATH EQUATIONS
<br /><br />
(5x<sup>2</sup>y<sup>5</sup>)
(-4x<sup>4</sup>y<sup>3</sup>)
<br />
25r<sup>2</sup> - 60rs + 36s<sup>2</sup>
</p>
</body>
</html>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
<html>
<head>
<title> the SUBSCRIPT element</title>
</html>
<p>
CHEMICAL BONDING
<br /><br />
Water: H<sub>2</sub>0
<br />
Baking soda: NaHCO<sub>3
<br />
Calcium hydroxide: Ca(OH)<sub>2
</p>
</body>
</body>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
Using Lists
List are often easier to read than paragraphs. They are also a
great way to provide information in a structured, easy-to read format.
Furthermore, they help our visitor to easily spot information, and they
draw attention to important information. Lists come in two varieties:
numbered (ordered) and bulleted(unordered).
<html>
<head>
<title> the UNORDERED LIST element</title>
</head>
<body>
Top new features of Adobe Dreamweaver CS3
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
<br />
<ul>
<li>Spry framework for Ajax
<li>Spry widgets
<li>Spry effects
<li>Advanced Photoshop CS3 integration
<li>Browser Compatibility Check</li>
</ul>
</body>
</html>
<html>
<head>
<title> the ORDERED LIST element</title>
</head>
<body>
<h1>
The ORDERED LIST element
</h1>
</body>
</html>
Invisible Comments
Aside from white spaces, there are other things your Web browser
ignores, these are comments. Since they will not be displayed by the
browser, comments can be used to put significant statements and/or
remarks that you do not want to be displayed. The comment tag is a
container tag that uses<!—as a starting tag and – - as and end tag.
<html>
<head>
<title>Latest IT Books</title>
</head>
<body bgcolor=”#000000” text=”#ffffff”>
<!- -
This is my comment which will not be displayed on the page
-->
This is a page with black background and test changed to
white.
</body>
METRO BUSINESS COLLEGE
200 Dolores St. Arnaiz Ave. Pasay City
<html>
You can change the background color of the page by using the
bgcolor attribute <body bgcolor=value”>_<</body>
<html>
<head>
<title> Latest IT Books</title>
</head>
<body bgcolor=”#ff0000”>
This is the first line of the text. Even if you press the
Enter key now no new line will be created.
</body>
<html>