Professional Documents
Culture Documents
HyperText Markup
Language
An Introduction
Basic HTML
<body>
My first Web page
</body>
</html>
Note: indenting makes page easier to read
The very first line
http://www.w3.org/pub/WWW/TR/WD-html32#html
Basic Tags
<html></html>
- defines the document as HTML
<head></head>
- defines start/end heading information
<title>My First Web Page</title>
This defines the information that will go in the browser’s caption
<body> </body>
What is here is displayed on the web page
What it looks likes
Body Attributes
BACKGROUND="location_of_image" - Background image for
web page.
– <body background="kitten.jpg">
BGCOLOR=“color”
– <body bgcolor=“red"> (later we will discuss hexadecimal color code)
LINK=“color" - Color for Links
– Most browsers default to blue
– Only change if have really good reason, confuses/annoys people
VLINK=“color" - Color for Links the User has Already Visited
– Most browsers default to purple.)
– Only change if have really good reason, confuses/annoys people
TEXT=“color" - Text Color
Comment Tags
Note: HTML automatically adds an extra blank line before and after a
paragraph.
Line Breaks
The <br> tag inserts a line break and doesn’t insert any empty lines
before or after. (notice no ending tag)
<p align="center"><br>Roses are red<br> Violets are
blue<br> Sugar is sweet<br> and so are you.</p>
Note: I didn’t use formatting to show that the <br> put in the line
breaks, HTML usually should be formatted for readability
Preformatted Text
<pre>
This is preformatted text.
Whatever is typed here
is displayed as
it was typed,
spaces & line breaks
are preserved
</pre>
<pre>
for i = 1 to 10
print i
next i
</pre>
Text Formatting Codes
<b>bold</b>
<i> italic</i>
<big>big</big>
<tt>teletype</tt>
<small>small</small>
<u>underline</u>
Normal<sub>subscript</sub>
Normal<sup>superscript</sup>
Deleted and Inserted Text
<p align="center"><b><u><i>text</i></u></b></p>
text
<body>
<
<p align = "center">
<font size=“+1">
<b>Vietnamese-German University<br>
Foundation Year<br>
English for Computer Science</b>
</font>
</p>
<hr>
Practice (cont)(save as “Rose.html”)
<address>
<p>
Created by, <a href="mailto:kimnguyen@vgu.edu.vn "> Kim Thi Nguyen
</a><br>
<a href="http://www.vgu.edu.vn/">The Vietnamese-German
University</a><br>
<tt>last modified:18 Oct 2010</tt>
</p>
</address>
</body>
</html>