Download Basic HTML Workshop

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

URL shortening wikipedia , lookup

Cascading Style Sheets wikipedia , lookup

URL redirection wikipedia , lookup

Transcript
Basic HTML Workshop
LIS Web Team
Fall 2006
What is HTML?
Stands for Hyper Text Markup Language
Computer language used to create web
pages
HTML file = text file containing markup
tags such <p>
Tags tell Web browser how to display a
page
Can have either *.htm or *.html file
extension
HTML Elements
Tags surrounded by angle brackets < >
Usually come in pairs

Start tag eg. <p> and end tag </p>
Stuff between is called “element content”
Tags are not case sensitive

New standard is to use lower case
XHTML
Lower case for tags = new standard
Preparing for next generation of HTML
called XHTML
Your created HTML document
<html>
<head>
<title> …document title… </title>
</head>
<body>
…your page content…
</body>
</html>
Page Components
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


First line of code
Declaration of version of HTML
<html>…</html>
 Container for the document
<head>…</head>
 <title> Title of page </title>
<body>…</body>
 Content of page
<html>
<head>
<title> …document
title… </title>
</head>
<body>
…your page
content…
</body>
</html>
Basic Tags
Headings

<h1>…</h1>
to
<h6>…</h6>
Paragraph


<p>… </p>
Inserts a line space before and after a
paragraph
Image Source Tag
<img src="url“ alt = “description of image” />
Empty tag – no closing tag
Document-relative link
url = points to location of the image
“pic.gif”
“/images/pic.gif”
alt – describes image for screen readers
Division Tag
<div>…</div>



Division or section of document
Use to group elements to apply formatting or
style
Example: all text within div tag will be green
<div style="color: #669966">
<h1> Title of section</h1>
<p> bla bla bla bla </p>
</div>
Link Tag
Link


Anchor tag <a>
2 kinds
Link to another web page. Use href attribute

<a href="url">Text to be displayed</a>
Create a bookmark inside a page by using name attribute



<a name=“#top”>Top of page</a>
Link to mail message
<a href=“mailto:your email address”>write out your
email address again or some descriptive text</a>
Exercise
Create 3 divs
Add in some links
Add a paragraph
Add an email link
Add an external page link
Add in an image
<html>
<head>
<title>Caitlin’s Page<title>
</head>
<body>
<div>
<a href="index.html>Home</a><br />
<a href="courses.html">Courses</a><br />
<a href="personal.html">Personal</a><br />
</div>
<div>
<p>Hello my name is Caitlin Nelson and I am writing about myself.
Contact info:
<a href="mailto:[email protected]">[email protected]</a>
</p>
<a href="http://www.hawaii.edu/slis/webteam">Web Team</a>
<div>
<img src="palmtree.jpg"alt=”a picture of a palm tree”/>
</div>
</div>
</body>
</html>
Next Mission
Choose colors for your page



Text color
Link color
Background color
Choose font size


Type of font
Font size
End Product
<html>
<head>
<title>Caitlin’s Page<title>
</head>
<body>
<div>
<a href="index.html>Home</a><br />
<a href="courses.html">Courses</a><br />
<a href="personal.html">Personal</a><br />
</div>
<div>
<p>Hello my name is Caitlin Nelson and I am writing about myself. Contact info:
<a href="mailto:[email protected]">[email protected]</a>
</p>
<a href="http://www.hawaii.edu/slis/webteam">Web Team</a>
<div>
<img src="palmtree.jpg"alt=”a picture of a palm tree”/>
</div>
</div>
</body>