Here are some guidelines for updating samba.org:
XHTML
The new design for samba.org uses xhtml 1.0 Transitional.
xhtml is different from html<=4.0 in several ways. The
difference is minimal in terms of syntax, but major in
terms of its implications on the page. A rundown of each:
***Case Sensitive***
xhtml is case sensitive, and all tags are lowercase.
!= Therefore, mixing case is bad, too.
You can't do .
***Closed Tags***
xhtml requires all tags be closed. Most notably, this
affects the former
,
, and tags; these should
now be written as
,
, and
. The img tag is the one that
catches people most often, especially in the following syntax:
. Even though
the anchor tags are closed, the image tag must still be closed.
***Proper Nesting***
Tags must close in the proper nesting order. An example:
. This is a simple example, but
in nesting lists it can get confusing. Also, within forms
using other tags can get sticky. I'm still learning some
of the nuances of this myself, so be careful with this
one. Use an online validator to check if you're not sure.
***Why You Should Care***
html is *very* forgiving. xhtml is not. If you miss one of
the above in your web page, there's no telling what it will
look like in different browsers. In fact, most of the wild
page display problems during the move to the new design were
due to xhtml validation problems. And there's no telling how
a browser may handle an error. We still have several html
hold-overs, but none of them are critical, at least in terms of
page display.
ADDING NEW PAGES
If you have to add a completely new page to a directory,
templates have been provided in each directory. Adding
a page should simply be a matter of opening the template
and adding in the info you want. Make sure you follow
the xhtml rules above and be sure to add a title between
the title tags. The two-header system was built to allow
for page specific titles. This is a help in browser bookmarks
and search engine indexing.
PAGE FORMAT
Page formatting is handled by css. This is another important
consideration in xhtml sites versus html sites. This means that
you should not use a bunch of attribute tags to style a page.
For example, is
not used in xhtml/css sites. The stylesheet rules control
the look of each element. If you use just normal tags for
headings and
tags for paragraphs, styles are already in place.
Also, see for a number of built in
styles. Simply declare a style as an attribute of a tag to use
a particular style. So if you want to use the headline style,
write
YOUR_INFO_HERE
. Stylesheets
distinguish classes with a "." and ids with a "#". Using the logo
style would require CONTENT_HERE
.
ADDING STYLES
If you need styles added or have special formatting requirements,
please email me (deryck[at]samba[dot]org). Questions and comments
are also welcome.