Question
Overview The purpose of this assignment is to (i) create your myweb.cs.uwindsor.ca domain for this course, (ii) to write your first web site content using
Overview
The purpose of this assignment is to (i) create your myweb.cs.uwindsor.ca domain for this course, (ii) to write your first web site content using a PHP file w/HTML and a CSS file.
Task
myweb.cs.uwindsor.ca
The School of Computer Science has an excellent user-manageable web-based domain and database management system configured using DirectAdmin software. This software will let you manage your own web domains and web sites. To enable and access your web site:
- Follow the steps in Slides: Using MyWeb and SSHFS to ensure you can log in to Computer Science resources.
- Go to http://www.myweb.cs.uwindsor.ca/.
- Click on Manage Web folders, databases and applications with DirectAdmin.
- Type in your UWinID and password and click the Authenticate button.
This will bring you to the main page of DirectAdmin and this will give you the following web domain (replacing UWINID with your UWinID):
- http://UWINID.myweb.cs.uwindsor.ca/
Transfer files to/from the web server per class instructions and Slides: Using MyWeb and SSHFS.
If, for some reason you need to re-create your domain, this is how it can be done/redone:
Click the Home button in DirectAdmin. (If you see a list of domains, then click one of them.)
- Click the Domain Setup link.
- Click the Add Another Domain link.
- Type in the domain UWINID.myweb.cs.uwindsor.ca (replacing UWINID with your UWinID).
- Enable Secure SSL, CGI, and PHP.
- Click the Create button to create this domain.
The rest of this assignment involves creating your first PHP page (generating some HTML output) and your first CSS file. You will need to place these files in the following myweb.cs.uwindsor.ca location:
- domains/UWINID.myweb.cs.uwindsor.ca/public_html/ (replace UWINID with your UWinID)
and you will access them using a web browser with these URLs (again replacing UWINID with your UWinID):
- http://UWINID.myweb.cs.uwindsor.ca/
- https://UWINID.myweb.cs.uwindsor.ca/
Creating index.php and first.css
When you access the main page of a web site, you typically do not specify a resource or file name after the domain, e.g., you normally write just the domain names, e.g.,
- http://cbc.ca
- http://preney.ca
- http://uwindsor.ca
etc. When the page you specify refers to an entire directory, web servers are configured to look for a file with a default name. The Apache web server is commonly configured to default to names in this form: index.*, where '*' is '.html', '.htm', or '.php'. Since most server-side code in this course will be PHP, you will create your first PHP page in this assignment. This PHP page will output a straight-forward HTML page.
index.html
Start by creating an empty index.html file (or put some minimal HTML in it) in the top directory of your site, i.e.,
- domains/UWINID.myweb.cs.uwindsor.ca/public_html/index.html (replace UWINID with your UWinID)
Creating an empty index.html file causes the web server to transmit it to the client browser, i.e., accessing the directory will show nothing (or whatever you placed in this file). Many web servers are configured to show the contents of the entire directory (which can be a security and/or privacy issue), so by placing an empty index.html file in this directory, you ensure that the web server will not show the contents of the directory if it is configured to do such. (For this reason, many open source web applications actually have an empty index.html file in every directory to ensure that directory contents are never sent to web clients.)
a1.php
Every PHP page must start with '' must also be provided. The only thing that can be placed between '' is valid PHP code. (If invalid code is written, errors will be output to the web server's logs.)
ASIDE: Your web server logs are accessible via DirectAdmin. After selecting the domain name, click on the Site Summary / Statistics / Logs link, and then select the 100 lines link for Apache Error Log. Remember to periodically reload this page to see any new error messages as you reload web pages.
Since this is your very first PHP page, simply create a file called a1.php (i.e., "a1" for "Assignment 1") using a text editor and place this at the top of the file:
i.e., an empty PHP processing instruction. Since there is no code in it, it will do nothing --but it will be properly processed by the Apache web server.
Anything not placed between '' is simply output as-is. Thus, your task is to create a valid HTML5 web page that is written after ' ?>' which must have in it the following items:
- The page's title must be 'My First 60-334 Web Page' (without the quotes). This title must appear in the web browser's title bar when viewing the page. (Hint: Use
.) - The page must refer to an external CSS file. This file is the only location where the page formatting (e.g., colours, font settings, etc.) will be placed (see below).
- This file must be called a1.css.
- The page must have a title in the body area coded with an element.
- The page must have at least 2 images (JPEGs and/or PNG). (Please resize the pictures to be 640x480 or smaller!)
- The page must have at least 3 hyperlinks in it to other web sites.
- The page must have at least one table having at least 2 columns and 3 rows. (Each table cell must have some valid, even if made up, data.)
- The page must have at least 1 paragraph of text. (The paragraph should have at least 2 sentences in it.)
- e.g., the paragraph could introduce the web surfer to what the page is about.
- e.g., the paragraph could be text explaining what is in the table.
- etc.
The following must be set in a1.css so that the page appears in the web browser as follows:
- The web page's background-color must be this gray colour: #222.
- The web page's default (text) color must be this colour: #EEE.
- All elements must be centred.
- All
elements must set the background colour to #0F0. You may, optionally, add HTML5 content to the bottom of the page and experiment with CSS to format other aspects of the page.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started