Re: [extend-a-story-devel] Working Towards XHTML 1.0 Strict Compliance
Interactive and Extendable Story
Brought to you by:
jjweston
|
From: Jeff W. (S. Toby) <jjw...@ke...> - 2003-07-23 03:37:08
|
On Tue, 22 Jul 2003, Matthew Fringe Duhan wrote: > 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 been focusing on the strict variant. I've added the DTD declaration for XHTML 1.0 Strict to the document I'm working on to make sure it passes the validator. Working toward the strict specification will allow us to be better prepared for the future. I don't imagine I'm going to have too many problems with people using older browsers. > > 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 did consider using a more general class for the <h1> and <h2> tags, but it occurred to me that you may want to have a class for those tags that is separate from the centered class, so you can have your own custom styles applied to them. Also, the use of the <div> tag in that fashion seemed like the best replacement for the <center> tag. > > 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. Okay, I'll add a class for the width="500" table, and move the width specification to the style declaration. -- Jeff Weston (Sir Toby) |