[Skip navigation]


Mathematical statistics

Webpage standard

Help on the new Matstat webstandard will be continually added here, as time allows.

1. Page structure

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.

2. Linking

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.

2.1. Absolute or relative links

You can either link to a page with an absolute link, starting with http:// 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 server, e.g. <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 www.maths.lth.se directory (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. Slashes at the end of links

2.2.a. Link ending with slash

The link <a href="[...]/something/">someplace</a> referres to the default webpage in the [...]/something directory. This page should be named index.html where html can be replaced with, e.g. 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.php instead (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 index instead of staff.
This is correct: <a href="/matstat/staff/">people</a>.
Note: if this had been some other type of webserver the default pages could have been named, e.g., default.htm instead.

2.2.b. Links ending without slash

The link <a href="[...]/something">someplace</a> 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 [...]/something.html while
<a href="[...]/something/">someplace else</a> referres to the pagefile [...]/something/index.html so take care!

2.3. Relative links and slashes

2.3.a. Links starting with slash

The link <a href="/something[...]">someplace</a> denotes a link relative to our server's home directory. The server looks for it in the www.maths.lth.se/something[...] directory. You can, and should, leave out the http://www.maths.lth.se-part of 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 www.maths.lth.se directory.
<a href="/matstat/">Matematisk statistik</a> links to the default page in the www.maths.lth.se/matstat/ directory.

2.3.b. Links starting without slash

The link <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) material in the same directory as the page doing the linking.
<a href="labbar/lab1">labhandledning 1</a> links to the page(file) lab1 in the subdirectory labbar.
<a href="../material">course material</a> links to the page(file) material in the directory above the current one (e.g. back from the lab1-page).

2.4. Links to specific parts of pages

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 book.html page <h2><a name="chap2"></a>Chapter 2: More stuff<h2>.

3. Language

3.1. Default language

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:

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.

3.2. Naming conventions

If the page only exists in one language name it somename.html and link to it as <a href="[...]/somename">someplace</a>. Our server will assume the html part.
Note: leaving out the html-part in the link allows the page to be changed to a dynamically generated page, e.g. somename.php, without 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 <a href="[...]/somename">someplace</a>. The webbrowser will choose which language it (i.e., its user) preferres and our server supplies the html-part.
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.

3.3. Standardized layout

There are different versions of the standard layout for English and Swedish. Use the relevant one.

4. E-mail coding

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 mail2ascii('yourmailaddress@maths.lth.se') or mail2ascii('yourmailaddress@maths.lth.se','your name') 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.html in your web directory. Save your old page somewhere first!
Personal homepage in English:
Save person.html.en as index.html in your web directory. Save your old page somewhere first!
Course page in Swedish:
Save course.html.sv as index.html and material.html.sv as material.html in your course web directory.
Course page in English:
Save course.html.en as index.html and material.html.en as material.html in your course web directory (and translate the contents into English).
General purpose page in English:
Save exempel.html as whatever.html somewhere in Matstat's web directory or adapt a Personal or Course homepage.