Some Computer Geek Stuff About HTML



UNDER CONSTRUCTION Under Construction


Have Forms here
Going to put Frames here Later
Going to put Escape sequence here
OTHER PAGES ==> Basics More Basics More Advanced

BASICS OF FONT RENDING

**Geek stuff ** If you use in the <HEAD>: section <BASEFONT SIZE=X> For That, the # 3 is normal size text.
Any plus or minus are up and down from that.FONT : SIZE, COLOR and FACE
SUMMERY OF MAIN FORM COMMANDS
FORMS (generally require a script on your server)

Define Form
<FORM ACTION="URL" METHOD=GET|POST></FORM>
File Upload
<FORM ENCTYPE="multipart/form-data></FORM>
Input Field
<INPUT TYPE="TEXT|PASSWORD|CHECKBOX|RADIO|

IMAGE|HIDDEN|SUBMIT|RESET">
Field Name
<INPUT NAME="***">
Field Value
<INPUT VALUE="***">
Checked?
<INPUT CHECKED>(checkboxes and radio boxes)
Field Size
<INPUT SIZE=?> (in characters)
Max Length
<INPUT MAXLENGTH=?> (in characters)
Selection List
<SELECT></SELECT>
Name of List
<SELECT NAME="***"></SELECT>
# of Options
<SELECT SIZE=?></SELECT>
Multiple Choice
<SELECT MULTIPLE> (can select more than one)
Option
<OPTION> (items that can be selected)
Default Option
<OPTION SELECTED>
Input Box Size
<TEXTAREA ROWS=? COLS=?></TEXTAREA>
Name of Box
<TEXTAREA NAME="***"></TEXTAREA>
Wrap Text
<TEXTAREA WRAP=OFF|VIRTUAL|PHYSICAL></TEXTAREA>

Form: TEXTAREA Only no Action, Just shows text
SAMPLE OF CODE USED IN THE ABOVE TEXT BOX

<CENTER><FORM>

<textarea wrap="soft" rows="4" cols="47">



WRAP="off|soft|hard

COLS= is for card collums (width).

ROWS= is for lines showing (debth).



WRAP="off" is the default no wrapping

WRAP="soft" it wraps but the text is sent as typed.

WRAP="hard" it wraps and text is sent with line breaks at all wrap points. 

virtual was soft; physical was hard; not with recent browsers.



</textarea> </form> </center>




Please enter your name:
and your email address:

what do you think of my guestbook?

It's Great! It Stinks! You Stink!
I Stink! We All Stink!

Make any comments you'd like below:

Thanks for your input

The Code for the Above Form

<FORM METHOD="POST"  ACTION="mailto:wmccabe@comcast.net">

  <B>Please enter your name: </B>

<INPUT  NAME="username" size="30"> 

<BR>

<B>and your email address: </B>

<INPUT Name="usermail"  size="30">

  <P>

  <CENTER>

  <B>what do you think of my guestbook?</B>

  <P>

  <INPUT TYPE="radio" NAME=I_think_that  VALUE="It's_Great">It's Great! 

  <INPUT TYPE="radio" NAME=I_think_that  VALUE="It_stinks">It Stinks! 

  <INPUT TYPE="radio" NAME=I_think_that  VALUE="You_stink">You Stink!

  <BR>

  <INPUT TYPE="radio" NAME=I_think_that  VALUE="I_stink">I Stink!

  <INPUT TYPE="radio" NAME=I_think_that  VALUE="We_all_stink">We All Stink!

  <P>

  </CENTER>

  <H3>Make any comments you'd like below:</H3>

  <CENTER>

  <TEXTAREA NAME="comment" ROWS=6  COLS=60></TEXTAREA>

  <P>

  <B>Thanks for your input</B>

  <BR>

  <INPUT TYPE=submit VALUE="Send it!">

  <INPUT TYPE=reset VALUE="Start over">

  </CENTER>

  </FORM> 

A Basic Guestbook: Tested by walter. A + sign substitutes white space. It is all in one big line. Non alpha characters seem to be in escape codes. On radio buttone only the NAME=".." of the one chosen is included. All TEXTAREA is included.
Actual code resulting from the test
username=Walter+McCabe&usermail=wmccabe%40home.com&I_think_that=It%27s_Great&comment=An+interesting+first+step
the %40 is @, the %26 is ' do not know what code system it uses. Not ACSII.

META tags are used to help some search engines index your page,
especially if your page has frames. META tags should be placed
between the <HEAD> and </HEAD> tags of your document.

The most common META tags are going to look like this:

<HEAD>
<TITLE>META examples</TITLE>
<META name="***" content="****">
</HEAD>

The name="***" What type of meta tag you are using.

The content="****" will be the content of the tag you provide for
the search engine. Comma seperated.

<META name="keywords" content="HTML tags, search, homepage, web sites">
<META name="description" content="How to use HTML tags to your page.">
<META name="author" content="Walter McCabe">
<META name="generator" content="Notepad">

<HR>
Meta Refresh. A special case

How to redirect your viewers automatically

<META HTTP-EQUIV="refresh" content="2;URL=http://www.waltm.net/index.htm">
\_______________________/ |||=> the place to go to
|=>Special META Case ||=> a SemiColin
|=> Seconds before going there
example:
<HTML>
<HEAD>
<META HTTP-EQUIV="refresh" content="2;URL=http://www.waltm.net/index.htm">
<TITLE>Page has moved</TITLE>
</HEAD>
<BODY>
This page has moved. If your browser does not automatically
redirect you in a few seconds, click
<A HREF="http://www.waltm.net/index.htm">here</A> to go to
the new page.

</BODY>
</HTML>

Some JavaScript Snibits
Background Color

< script>
document.bgColor="blue"
< /script>

You can change blue to any color name, or the color's hex representation
(ie: #000000


Status bar messages

Using JavaScript, you can display messages in the status bar of your
browser below. This is accomplished by setting a string value to the
"window.status" property. For example:

< script>
window.status="Welcome to my homepage"
< /script>

By doing the above, the message "Welcome to my homepage" is shown
in the status bar. One trick you may have seen on the web is a
status bar message that is initiated only when the user moves her
mouse over a link:


Yahoo < == What you see

Here's the code used:

< a href="http://www.yahoo.com"
onMouseover="window.status='Click here for
Yahoo!';return true" onMouseout="window.status=''">Yahoo< /a>

Capture the mouse's "position" by using the onMouseover and onMouseout
event handlers. Event handlers are added directly inside certain
HTML tags such as the < a> tag, and allows you to run code that
react to a certain event (such as when the mouse moves over a
link). In this case, the code displays "Click here for Yahoo!" in
the status bar when the surfer moves her mouse over the link
"Yahoo", and resets the status bar when the mouse moves out.



Text inside the document is usually static- if you reload this
document 5 times, One of the things about JavaScript is that it
allows you to generate text on the fly. You could, for example,
have the document greet you "Good morning" in the morning, and
"Good night" at night. The basic way to write out text in
JavaScript is by using the document.write() command, as follows:
< script>
document.write('Some text')
< /script>

Whatever you put inside the parentheses, JavaScript displays it on the page.
Taking this basic idea one step further, I'll create a script that writes out
the last modified date of this page.



Date Modafied

< script>
var modifieddate=document.lastModified
document.write(modifieddate)
< /script>

10/26/1999 19:28:55

The text reflects the last modified date of your page, and is
updated automatically whenever you edit the page and save it!



JavaScript dialog boxes

JavaScript dialog boxes are little "pop-up" boxes that can be
used to display a message, ask for confirmation, user input etc.

Three types of dialog boxes exist in JavaScript- alert, confirm, and
prompt. I'll show you an example of each:

Alert:
< script>
alert("Welcome, my friend!")
< /script>





Confirm:
< script>
var answer=confirm("Jump to CNN?")
if (answer)
window.location="http://cnn.com"
< /script>



Prompt:
< script>
var answer=prompt("Please enter your name")
alert("Hello "+answer)
< /script>



Drop down menu box

< form name="c1">
< p>< select name="c2" size="1">
< option selected value="http://www.geocities.com">Geocities< /option>
< option value="http://www.walter.com">walter< /option>
< option value="http://www.geekspot.com">geekspot< /option>
< /select>
< input type="button" value="Go"
onClick="location=document.c1.c2.options
[document.c1.c2.selectedIndex].value">< /p>
< /form>

You can cram in as many links as you wish into the box by adding
more options to the selection list.

My HomePage

Last Modified on: