Web and Database Development Environment HTML Example

Create a sample html file

HTML files can go anywhere in your web development directory. You can create sub-directories and put the html files in there as well.

  1. For the tutorial, we'll create a new directory named tutorial:

    [username@l-lnx101 username]$ mkdir tutorial
    [username@l-lnx101 username]$ ls
    error_log examples index.html mysql_db_info psql_db_info tutorial ssl_error_log

  2. Next, cd tutorial and open the nano text editor (vi and emacs are also available, if you prefer):

    [username@l-lnx101 tutorial]$ nano

    Screenshot of the nano editor for web development

  3. You can then copy and paste the following html into nano:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
    <head>
    <title>A Simple Example</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>
    <body>
    A Simple Example
    </body>
    </html>

    Screenshot of the nano editor for web development

  4. Press Control+O to save the file, name it "index.html" and press Enter:

    Screenshot of the nano editor for web development

  5. Point your browser at http://webdev.cs.uiowa.edu/~username/tutorial/ (replace username with your divmsid) and you should see an html page that says "A Simple Example" and nothing else.