Upsorn Praphamontripong, Fall 2014 (based in part on class materials by Jeff Offutt)

This is a short introduction to writing HTML. Please feel free to compare page source with the screen.

What is HTML?

It is a special kind of text document that is used by Web browsers to present text and graphics. HTML documents are often referred to as "Web pages".

HTML tag = container (thus requires an opening tag and a closing tag)
Example: <p> content </p>
where <p> is an opening tag defining a paragraph and </p> is a closing tag.
HTML element = container and content

This page will introduce you to :

Some examples are presented below. If you are looking for more detail or something else, check out the book.

Basic structure of html

          
            <!doctype html>  
            <html>  
              <head> 
                <meta charset="UTF-8">  
                <title>Example: Basic html</title>  
                <!-- this is a comment: browser does not render the head element -->                           
              </head>
              <body>
                content .....
                <!-- this is a comment: browser renders the content of the body element --> 
              </body>
            </html>  
          
        

Some html tags

Examples

Definition list
term
definition1
definition2
term1
term2
definition
Link 432 class website
Form
Username:
Password:
Textarea
Drop down Select your favorite car:
Radio button
Select your major:
CS
SWE
ACS
Fieldset
User information
Unordered list Commonly used html tags
  • input tags
  • form tags
  • button tags
  • a tags
  • img tags
  • table tags
  • .....
Ordered list To deploy and test servlet
  1. Compile your servlet
  2. Put a java class under /data/apps-swe432/swe432/WEB-INF/classes/username
  3. Put jar files under /data/apps-swe432/swe432/WEB-INF/lib/username (if applicable)
  4. Put data files under /data/apps-swe432/swe432/WEB-INF/data/username
  5. Set permission for all files and directories under /data/apps-swe432/swe432/WEB-INF/classes/username using chmod 644
  6. Access your servlet via http://apps-swe432.vse.gmu.edu:8080/swe432/servlet/username.servletname