HTML "Quick & Dirty" by Bill Welsh @ SDSU revised 2003 Nov 6 ----------------------------------------------------------------- There are only two simple rules you need to know, and very few commands. The rules are: (1) commands are written inside angle brakets (the "<" and ">" symbols) so all commands look like . (2) all commands require a start and a stop. The command name itself is the start. The stop is the command name with a backslash in front of it. For example, the command makes all text that follows it have italic font. To end the italic style, you stop the command with . Note that upper- and lower-case do not matter. The most common & useful commands are as follows. TEXT FORMATTING --------------- = italic text = bold face = underline
= center the text

= start new paragraph
= line break (like a carriage return) " ) The FONT command is slightly more complicated because it can take several arguments. COLOR and SIZE are arguments for FONT. There are other arguments but these are the two most useful ones. In the above, xxx is a word like "white" and yyy is a number from 1 to 7, with 7 being the largest; 3 is default font size. You don't need to include arguments other than the one you want. So if you only want to change the color, you can say . To end the special font, type . Note: the
command does not require a
to stop. LINKS ----- To link to another html page, do this: yyyy where xxxxx is the name of the file, and yyyy is the description of the file that will appear in the current page. For example: Astr 680 class syllabus
would link to a file called syllabus.html, and the words "Astr 680 class syllabus" would appear underlined in the current page. TO DISPLAY AN IMAGE: -------------------- where xxxx is the name of the image file, usually .jpg or .gif format. A more fancy display is possible by using: This sets the size of the image in x and y pixels and puts a box around it. This wraps the text around the image. The image will be diplayed on the left. You can use "left" or right". Use the command
to end the ALIGNment. Note that you cannot place an image at a specific place on the page; the align is about the best you can do. HTML Must-haves: ---------------- Each html file must start and end with the command and have a command. These can differ somewhat to give different effects, but the basics are: PROF. WELSH'S ASTR WWWEB PAGE LINKS (your stuff goes here) The LINK and VLINK set the colors of hypertext links. If you want, instead of using words like "yellow", hexadecimal numbers are used to define the colors. This is because different browsers interpret the definition of the words "yellow", "red", etc. differently. If you want to make sure the color does not depend on the browser, use the strict hexadecimal definition. For example, FFFF10 = gold and FFFC6 = yellow. You should call the top-level home page of your site "index.html", though its not strictly necessary. It is the default name that browsers will look for. All other files must be in or below this directory level - you can't go upwards.