Help on the new Matstat webstandard will be continually added here, as time allows.
The structure of a standardized Matstat webpage is more complicated than a straight forward page. This is due to the need for layout directions. The browser needs to be told which parts to layout in what way. The different <div id="something">-tags do the work of structuring, the stylesheet then determines how a particular part of the structure should be layed out. E.g. it says that a <h2>-tag should be bold white on blue if is occurres in the left hand navigation bar but big, blue, smallcaps, and centered if it occurres in the headline, and big blue and left adjusted in the main body.
I suggest that you skim through the annotated version of the general purpose page to get an idea of what is what.
General mandate: do not use "click here" as link text, use something that makes a bit
more sense out of context.
Hint: if your browser can produce a list of the links on a page (probably under "View Page Info"), you can use that to help verify that your link texts are informative.
You can either link to a page with an absolute link, starting with
followed by server name and tracing down to where the file is located, or you can use a
relative link that traces the directory structure from the directory where the
page doing the linking is placed.
You have to use absolute links if the page you are linking to is on some other
<a href="http://www.lth.se/utbildning/">LTHs utbildningar</a>.
In all other cases you should use relative links. These come in two variants,
one starting in the
(see 2.3.a. Links starting with slash), the other starting in
the same directory as the page doing the linking (see
2.3.b. Links starting without slash).
You should use the first variant (with slash) if the page you are linking to belongs in
some other part of the web structure, e.g. when linking to your home page from a course
home page and vice versa, e.g.
<a href="/matstat/staff/anna/">Anna Lindgren</a>.
You should use the second variant (without slash) when the page you link from and the
page you link to belong closely together both logically and physically, e.g. the
different pages that belong to the same course and placed in the same course web
directory, or in a sub directory, e.g.
<a href="material">course material</a>.
2.2.a. Link ending with slash
referres to the default webpage in the
This page should be named
html can be replaced
php if the page is dynamically generated. See also the language
naming conventions if the page exists in several languages.
You should (almost) never add the index-part to the link.
- This is wrong:
<a href="/matstat/staff/index.html">people</a>. It will stop working when I rename the page
index.phpinstead (unless I take some specific steps to prevent it, and I might forget to...).
This is wrong:
<a href="/matstat/staff/index">people</a>. The server knows what the default is, you don't have to tell it again.
This would have been wrong:
<a href="/matstat/staff/staff.html">people</a>. The default page should have been named
This is correct:
Note: if this had been some other type of webserver the default pages could have been named, e.g.,
2.2.b. Links ending without slash
referres to the file named, by default
something.html but the
html-part can be replaced by, e.g.
php and/or some
language extentions; see naming conventions.
<a href="[...]/something">someplace</a>referres to the pagefile
<a href="[...]/something/">someplace else</a>referres to the pagefile
[...]/something/index.htmlso take care!
denotes a link relative to our server's home directory.
The server looks for it in the
You can, and should, leave out the
links because a link is by default assumed to be on the same server as the page
that is doing the linking.
Note: This practice also allows us to rename the server without having to replace each and every link.
<a href="/">Matematikcentrum</a>links to the default page in the
<a href="/matstat/">Matematisk statistik</a>links to the default page in the
<a href="something[...]">someplace</a> denotes a
link relative to the directory of the page doing the linking.
<a href="./">home</a>links to the default page (index.html) in the same directory as the page doing the linking.
<a href="../">home</a>links to the default page (index.html) in the directory above the one where the page doing the linking is placed.
<a href="material">course material</a>links to the page(file)
materialin the same directory as the page doing the linking.
<a href="labbar/lab1">labhandledning 1</a>links to the page(file)
lab1in the subdirectory
<a href="../material">course material</a>links to the page(file)
materialin the directory above the current one (e.g. back from the
You can link to different parts of a page by adding
<a name="somelabel"></a> at the place you want to be able to
jump to, and linking to it by
<a href="[link to page]#somelabel">someplace</a>.
- Link within the same page:
See <a href="#chap2">Chapter 2;</a> for details. [...] <h2><a name="chap2"></a>Chapter 2: More stuff<h2>.
Link to different page: On this page
See <a href="book#chap2">Chapter 2</a> for details., on the
<h2><a name="chap2"></a>Chapter 2: More stuff<h2>.
The consenus language on our web site seems to be English. In principle you can use either English or Swedish on any page with two exceptions decided by the Lund University Web Policy:
- All departments should have a popular description of their research in Swedish.
- Pages concerning undergraduate education should be in Swedish.
Nothing prevents you from adding an English or Swedish copy of any page. If your course is given entirely in Swedish you should use Swedish on it's homepage. Otherwise you can use whatever language your students understand.
If the page only exists in one language name it
somename.html and link to it
Our server will assume the
Note: leaving out the html-part in the link allows the page to be changed to a dynamically generated page, e.g.
everyone having to replace all the links.
If there are two versions of the same page, one in English and the other in Swedish,
name the English one
somename.html.en and the Swedish one
somename.html.sv and, again, link to the page as
The webbrowser will choose which language it (i.e., its user) preferres and our server
Note: if you are specifically linking to, e.g., the Swedish version, you have to use the link
<a href="[...]/somename.html.sv">På svenska!</a>
with the full extension.
There are different versions of the standard layout for English and Swedish. Use the relevant one.
Those strange e-mail addresses in the html-code are an attempt to fool e-mail-collecting
robots. Magnus W has written and I expanded the handy Matlab-function
mail2ascii.m for producing them. Call it as
and copy the result to the homepage.
Save one of the following files and change anything where the code says INSERT.
- Personal homepage in Swedish:
- Save person.html.sv as
index.htmlin your web directory. Save your old page somewhere first!
- Personal homepage in English:
- Save person.html.en as
index.htmlin your web directory. Save your old page somewhere first!
- Course page in Swedish:
- Save course.html.sv as
index.htmland material.html.sv as
material.htmlin your course web directory.
- Course page in English:
- Save course.html.en as
index.htmland material.html.en as
material.htmlin your course web directory (and translate the contents into English).
- General purpose page in English:
- Save exempel.html as
whatever.htmlsomewhere in Matstat's web directory or adapt a Personal or Course homepage.