C:\Users\m179999\Desktop\si110\www
on your laptop, which you'll have to create!):
index.html" has a special meaning, which
will be explained later.) The page is an introduction to who you are. Cover
the basics of why you came to the Naval Academy and what you hope to
service select some day.
| basic layout of an html file | basic html formatting tags |
<html>
<head>
<title>Your title here</title>
</head>
<body>
Content of web page here
</body>
</html>
|
|
Note: to open your webpages just press ctrl-o in your browser and choose one of the two newly created files.
img within your C:\Users\m179999\SI110\www
directory — of course you'll have to create
the img directory. The other two images
should be out on the web somewhere, and you just need the
URLs for those images. Images are embedded with
the img element (which has no closing tag). You
give a value to the src attribute that is
either a URL for the image somewhere on the web, or a
relative path to the image starting from that html document's
directory. So for example:
<img src="http://intranet.usna.edu/images/facebook_icon_00115.png">
←
<img src="../../larr.png">
Warning! You should not use an image URL that requires a password to access! So, if you have a photo on your facebook account, don't use its URL for one of your photos. Anyone visiting your website would need your facebook username and password to actually view the thing.
a element. The
structure is like this
<a href="location-of-thing-you're-linking-to">text-that-is-clickable</a>As with images, link locations given in the
href
attribute can be URLs or relative paths.
<a href="http://oeis.org/">click me</a>
<a href="boring.html">click me</a>
index.html needs to have a link to your
interests.html page, and your interests.html
page needs to have a link back to your index.html.
Second, you will need to add links to two of your classmates'
pages. However, these will have to be added after you finish
with the following section. To get started right now, you
should add a link to some webpage outside of usna.
rona.cs.usna.edu, which is the same
server as is hosting these notes.
We'll transfer files using WinSCP, a program that should already
be on your machines. If not, it can be downloaded from
winscp.net.
| double click on | Fill in, then click on Save | Click on OK | Login |
|
or type WinSCP in the Windows Orb search box. |
|
|
|
rona.cs.usna.edu.
In the left pane,
navigate to your web page files that you've been working on. In the right
pane, double click on the www folder to enter that
directory.
In the left pane, highlight all of the files and folders that comprise your
website (hold down control and click on them one at a time) and drag them to
the right pane (which should be your www directory opened). Do NOT select
the entire www directory on the left...just the contents of that directory.
You are duplicating the contents in the www directory on your computer into
the www directory on rona.
You
should see an indication that the transfer is taking place. Once completed,
you will see your files in the right pane, meaning that those files are
now also on the web server.Important1: recall that a process can only access a file if its owner is the same as the file's owner. You are not the owner of the webserver process, but you are the owner of your files, which means the webserver can't access your files to send them to browsers. So, you have to grant others permission to access these files. You can do this within WinSCP by right-clicking on the file (on rona) and checking the R (i.e. read permission) box next to others, as shown in the image to the right. Note that for any dirctories, you need to check X (i.e. execute), not just R.
Important2:
The URL for your index.html file
is http://rona.cs.usna.edu/~m179999/index.html.
So, to link to your site someone would do something like this:
<a href="http://rona.cs.usna.edu/~m179999/index.html">MIDN Doe</a>
Important3: If you modify files from your site on your laptop, you need to copy the new versions over to rona!
index.html and interests.htmlindex.html
to interests.html and a relative path link from
interests.html back to index.html.
index.html the si110 animation:
<script type="text/Javascript" src="http://rona.cs.usna.edu/~si110/resources/lb/colorMorph.js"></script>and the introspection window:
<script type="text/Javascript" src="http://rona.cs.usna.edu/~si110/resources/lb/introspection.js"></script>