Re: [extend-a-story-devel] Working Towards XHTML 1.0 Strict Compliance
Interactive and Extendable Story
Brought to you by:
jjweston
|
From: Matthew F. D. <fr...@fr...> - 2003-07-22 06:42:17
|
On Saturday, July 19, 2003, at 12:42 PM, Jeff Weston (Sir Toby) wrote: > I've taken a bit of time to investigate what it will take to make > Extend-A-Story compliant with XHTML 1.0 Strict. I've started with the > documentation files, since those are static and should allow us to > convert > over to the new standard without too much difficulty. Once we settle > upon > a good way to convert to the new standard in general, we can move on to > converting the Extend-A-Story code. I agree with this approach. As it is now, the files should pass a test for XHTML Transitional with the addition of the correct DTD: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > at the start of the document before the copyright notice. I tested this in the w3c validator and it passed. XHTML strict is, of course, more strict, and doesn't allow ANY presentation formatting in the code, such as color or align. For backwards compatibility I'd recommend sticking with XHTML 1.0 Transitional. If we want to be forward thinking and only focus on 5+ browsers then XHTML 1.1 Strict should be okay. What do you think? > > I've found a validator that I've been using to ensure the HTML is valid > for the new standard. Here is a URL: > > http://validator.w3.org/ Yes, the W3C also offers a program called Tidy which can validate. It acts as a standalone or as a plug-in to many editors. > > The first thing I've noticed about the HTML you've given me is that you > are still using attributes that are not part of the XHTML 1.0 Strict > standard. I have started over with the begin.html document from > scratch, > and have been testing it against the validator. You can look at my > version > here: > > http://www.sir-toby.com/extend-a-story/beta-story/docs/begin.html Oops, as I mentioned above, I was coding more for XHTML 1.0 Transitional, and did that before I saw this part of the e-mail. :) (That'll teach me to read). What you've got looks fine, though I question the use of the div tag. It seems unnecessary. Why not instead define a generic class: .centered {text-align: center} And then any element can be a member of that class: <h1 class="centered" >Extend-A-Story</h1> <h2 class="centered" >Instructions for Beginning Players</h2> etc. Just different coding styles I guess. I tend to shy away from div unless it's necessary as a functional or layered grouping. > > I had to add a <style> section in order to get the same layout as the > previous version. Take a look and let me know what you think. Again, my > goal here is to allow us both to have our own formatting of the HTML by > just adjusting an external style sheet. The <style> section I am using > now > will eventually be moved to a seperate file. Let me know if you think > we > need to add any additional classes or anything to give you the > flexibility > to style the document to your needs. I agree with making the styles external eventually. Other than the div issue mentioned above, I think that it looks okay. I might recommend making the table a class as well, in order to specify the width (and any other presentation elements) in the CSS. Sincerely, Matt |