First we'll practice creating navigation to a complex of several pages.
img) below the contact information. Use one of the example images.
Save the image to folder U:/networks/demo2/.
mailto link. For example:
<a href="mailto:tommi.j.lahtonen@jyu.fi">tommi.j.lahtonen@jyu.fi</a>
ul) with two lines:
Studies and Links.
<address>
<a title="Webmaster" href="http://www.cc.jyu.fi/%7Eusername/">John Doe</a>
(<a title="E-mail to webmaster" href="mailto:username@st.jyu.fi">username@st.jyu.fi</a>)
<strong>2000-09-18 12:47</strong>
</address>
ul).
If you don't have any favorites, put links to the homepage of the course
and to the front page of the University of Jyväskylä. Write a title and a main
heading. Save.div element. An example:
<div>
<a href="lectures/">Lectures</a> |
<a href="exercises/">Exercises</a> |
<a href="assignment/">Assignment</a> |
<a href="notes/">Lecture notes</a> |
<a href="schedle.html">Schedule</a> |
</div>
link element inside the head element of every XHTML document you made above.
With this link you link the CSS file to all the documents. The following information should be inserted
to the link element:
<link href="demo2.css" rel="stylesheet" type="text/css" />
body element as
follows:
body {
font-family: Verdana, Arial, "Trebuchet MS", sans-serif;
}
Verdana, Arial ja "Trebuchet MS" are names of the fonts in use. The first one in the list is used
on the page. The author of a www page cannot know which fonts all the browsing people have on their computers so
several options are needed.
sans-serif means a font family from where the font is selected if none of the other fonts are in use.
margin-left: 2%;
margin-right: 2%;
margin-top: 1%;
margin-bottom: 1%;
Thus, the left and the right margin of the whole page are 2% of the size of the page. Top and bottom margins in turn are 1% of the size of the page.
Save and look at the page on the browser window.
h1, h2, and p elements:
margin-left: 1em;
margin-right: 1em;
margin-top: 1.5em;
margin-bottom: 1.5em;
The em unit relates the size to the size of the default font of the browser.
Save and check on the browser window. Change the margins to what you like.
.navbar style like this:
border-style: solid;
border-width: thin;
border-color: #000000;
The style .navbar is not yet in use so change the code for the navigation in studies.html and
your link page to
<div class="navbar">
There the div element now uses a style called navbar.
Look at the pages on the browser window.
background-color: #EEEECC;
color: #FFFFFF;
For defining the colors as RGB codes see the WDG site.
It is not necessary and sometimes not even wise to change other link definitions but
hover effect is useful. For example:
a:hover {
color: white;
background-color: #993399;
}
Now you will learn how to copy a WWW page to a WWW server for everyone to see.
http://www.cc.jyu.fi/~username/
For example: http://www.cc.jyu.fi/~tjlahton/.
You can also use:
http://www.st.jyu.fi/~username/http://www.cc.jyu.fi/%7Eusername/http://www.st.jyu.fi/%7Eusername/Select one of the forms and use the same one always when you give your www address to someone.
If you don't want to have a homepage yet, you can hide the exercise documents you put to the server by creating an empty homepage. Create an empty page by writing
touch index.html
when in the www folder.
Secure File Transfer by SSH is a Windows programme for secure copying of files between computers that support the SSH2 protocol.
New folders are created by Operation|New Folder.
SCP2 is a similar programme to Secure File Transfer Client but it is used from the command window.
scp -r demo2 username@server.st.jyu.fi:www/networks/
The command line above copies the demo2 folder and all its subfolders to the www server.
Attribute -r copies all subfolders and files therein.
http://www.cc.jyu.fi/~username/networks/demo2 by using the browser.
pre also has its own backgroung color and border.td). Put the styles
that correspond to the ID definitions to the CSS file so that those styles can be used for changing the properties
of the cells. Also define the following properties:
div
element so make a subclass .center for div where you can define the centering.| aqua | black | blue | fuchsia |
| gray | green | lime | maroon |
| navy | olive | purple | red |
| silver | teal | white | yellow |