1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
H O M E
  Review

 

What is a markup language?

The rules of tags.

Adding attributes and properties.

New XHTML rules.

The Document Model.

Browsers receiving tags.

Structural tags.

Separating presentation from content

Types of tags

Block and Inline tags

Basic HTML pages

Content-based tags vs non-content-based tags.

Forcing a page to our evil will.

 

  Some More Art Sites

From Ms. Schlein
MW

Deviant Art

 

From Ms Yano
MW

The Museum of Web Art

 

  So What is :// ?

Thanks to Mr. Porano

The "://" in "http://www.etc" is from Unix and identifies the path to the operating system. Similar to Windows "C:\DocumentsEtc".

 

  Horizontal Rules

Simple & Limited

<hr />

 


 

<hr align="left" size="10" width="400px" />

 


 

<hr align="left" size="10" width="400px" noshade />

 

 

More control if you use an image:

 

  Images

As Text Headline

Remember that you can't depend on end users having more than the simplest serif, san-serif, or monospaced fonts. Use an image instead

The Basic Tag

<img src="images/specialfont.gif" />

 

Inline Alignment

<img src="images/thing.gif" align="bottom" />

 

Lorem ipsum dolor sit amet consectetaur adipisicing elit consectetaur adipisicing elit Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct.

 

<img src="images/thing.gif" align="top" />

 

Lorem ipsum dolor sit amet consectetaur adipisicing elit consectetaur adipisicing elit Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct.

 

<img src="images/thing.gif" align="middle" />

 

Lorem ipsum dolor sit amet consectetaur adipisicing elit Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct.

 

Alignment In A Paragraph

<img src="images/thing.gif" align="left" />

 

Lorem ipsum dolor sit amet, consectetaur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda.

 

<img src="images/thing.gif" align="right" />

 

Lorem ipsum dolor sit amet, consectetaur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda.

 

<img src="images/thing.gif" align="right" />

 

Lorem ipsum dolor sit amet, consectetaur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda.

 

Spacing Around

<img src="images/thing.gif"align="left"  vspace="15px" hspace="15px" />

 

Lorem ipsum dolor sit amet, consectetaur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und lookum like Greek to me, dereud facilis est er expedit distinct. Nam liber te conscient to factor tum poen legum odioque civiuda. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

But! It doesn't work in Windows IE 6.0, so fugedaboutit. We'll do with stylesheets later anyway.

 

Centering On The Page

Two ways for now:

<p align="center">

<img src="images/thing.gif" />

</p>


 

<center>

<img src="images/thing.gif" />

</center>


 

But, there's no equivalent <left>  or  <right>  tags

 

Bored with Borders

<img src="images/thing.gif" border="4"/>


See it here.

Any color you want, as along as it's black.

Look out for the GOTHCA!

<img src="images/thing.gif"/>


If the image is a link, it will gain a border unless you set the border to 0.

<img src="images/thing.gif" border="0"/>


Unless you set the border to 0

 

Sizing

<img src="images/thing.gif" />

The image automatically defaults to the size it was created at.

This statement provides the same results as the previous one:

<img src="images/thing.gif" width="100

height="100"/>


But, you can cheat and reset the size to anything you want:

<img src="images/thing.gif" width="400

height="50"/>


This is how you do the horizontal rule trick we talked about earlier:

<img src="images/redrect.gif" width="100%

height="10"/>

 

Note that we used "100%" rather than "100" which would give us the width in pixels.

 

  Backgrounds and Colors

Show your colors

You can control the background color and even add a background image with attributes in the body tag:

<body bgcolor="#990000" />

Demo here.

<body background="images/pattern.gif" />

Demo here.

You can even use animated gifs (more later).

<body background="images/aniback.gif" />

Demo here.

 

How to get ugly fast

Put a complex background in.

Demo here.

 

  Hypertexting Around

Anchors Away

This is what make the HTML name what it is the anchor tag:

<a href="someURL">Here</a>

The ability to link to another document or page. It's the same as if you typed it in the browser's URL field.

You can point to:

Inside the current document

To another doc in the same domain (on the same server).

Inside another doc in the same domain.

To another doc anywhere on the web.

Inside another doc anywhere on the web.

 

URL's Again

They can get quite long:

http://www.amazon.com/exec/obidos/tg/detail/-/ B00005OQM7/qid=1059246015/br=1-6/ref= br_lf_hi_6//104-9595377-8870363?v=glance&s=hi&n=229148

You can use www.makeashorterlink.com. It will give you this instead:

http://makeashorterlink.com/?Y57935216

 

Do's and Don'ts in naming files:

Stick to alpha numerics, a-z, 0-9, and underscore and dash

No Spaces

Use underscores "_" or dashes "-" instead

Think about using capitals

Most of all, be consistent!

 

Bad naming:

My File.htm

Good naming:

My_File.htm

Better naming:

my_file.htm

 

Attributes'n Props

Other attributes and properties for the anchor tag

id="text"

Any name you want, but no spaces can save some trouble later down the line.

href="some url"

Any valid URL or id

target="_blank"

Open in a new unnamed browser window

target="_self" Default value. Replaces the current page in the same frame or window. But we don't do frames...
target="_parent" More frame based stuff. Never you mind.
target="_top" Ditto

 

Naming names

Fragments, aka Named Anchors, are little <a> tags that can be placed anywhere in your document and used by a URL to link directly to that part of the page.

<a id="here_it_is" />


Alternately, you can give any tag an  id  attribute to link to

 

  Other href URL Types

Alphabet soup time again

file://server/path

For working locally on your own computer or a LAN

file://C:/Documents and Settings/James/My Documents/
Web Files/KhazarDotCom/
www/docs/art3870/
lecture_03.htm

ftp://

Two flavors:

Unauthenticated or Anonymous FTP

ftp://ftp.khazar.com

Authenticated

ftp://user:passwrd@server:path

shttp://server/path

Secure HyperText Transfer Protocol

mailto:name@domain

Opens the default email program with name@domain in the address line. You can also set the subject line:

<a href="mailto:webmonkey@ hotwired.com?subject=I love cats too!">

But be cautious of web spiders and spam!

 

  Back to Anchors

Link inside the same page

Put this somewhere in the doc:

<a id=”here” />

Or put an id on any tag for that matter:

<img src="images/asdf.gif" id=”here” />

Then, a link to there from somewhere else on the page:

<a href=”#here”>jump!</a>

 

Link inside the same domain

To Link to another doc in the same domain:

<a href=”filename.htm”>

<a href="lecture_01.htm">

To the inside of another doc in the same domain:

<a href=”filename.htm#id”>

<a href="lecture_01.htm#servers">

 

Useful Relations

Those were “relative” anchors.
These are “absolute” anchors

To another doc anywhere on the web:

To the inside of another doc anywhere on the web:

 

Other Useful Attributes

accesskey="x"

Makes a link accessible by the keyboard.

Some single key with a command or alt. It's good practice to tell the user what the key is and what it does.

tabindex="1"

Sets the order the link will be highlighted in when the Tab key is used.

 

  Tricks with Special Characters

" & < > € Á á  ⠴ Æ æ À à Å å à ã Ä ä ¦ ¦ Ç ç ¸ ¢ ˆ © ¤ ° ÷ ÷ É é Ê ê È è Ð ð Ë ƒ ƒ ½ ¼ ¾ Í í Î ¡ Ì ì ¿ Ï ï « ¯ µ · ¬ Ñ ñ Ó ó Ô Œ œ Ò ò ª º Ø ø Õ õ Ö ¶ ± £ » ® Š š § ¹ ² ³ ß Þ þ ˜ × Ú ú Û Û û Ù ù ¨ Ü ü Ý ý ¥ Ÿ ÿ ‌ ‍ ‎ ‏ – — ‘ ’ ‚ “ ” „ ‹ › † ‡ ‰ • … ″ ′ ‾ ⁄ ℘ ℑ ℜ ™ ℵ ← ↑ → ↓ ↔

Use &nbsp; to put in extra spaces

<h1>add &nbsp;&nbsp;&nbsp; some space</h1>

add     some space

 

  A Few More Attributes

 

alt="text"

Text that will appear when you hover over the object and that will be read aloud by reader applications

class="someclassname"

Identifies the object for a stylesheet.

id="somename"

A unique name for an object that can be used for a link or a stylesheet.

style="attribute:property;"

An inline stylesheet! Note the punctuation.

 

  A Word About No Words

Image Maps

Cumbersome, bulky and tré 90's

  Exercises

1
horizontal rules

Make a page with horizontal rules that looks like this:

2
Image Tags & Centering

Get image here

Create a page that centers an image with both the <center> and the <p align="center"> tags:

 

3
Wrapping around images

Get text here

Create a page that wraps text around images that looks like this:

Hint: the second paragraph puts the images later down the text.

 

4
Background Images

Get background image here

Build a page that looks like this:

Hints:

The bar is made from the thing.gif.

The header uses a <font> tag with attributes.

 

5
Link an image

Take the page from exercise 4 and link it to the file from exercise 3 using the image as your link.

Try making the image not have a border from the link tag.

6
Linking to an id on another page

Take the page from exercise 5 and link it to the "server" id on the lecture_01.htm page of this site.