Actually, I thought this thread was going to be about learning coding from playing DF.
It's what I thought, too, and we're probably some way from OP tying up a (coded) HTML-generator to DFHack's interogative functions to create something like the example page at a click of a mouse, but I'd be happy to help guide them on that (slightly demanding) route, or something similar, and first step might well be Mastery Of Markup! And, even if that's not where we're heading, I repeat that basic hands-on knowledge of markup is good, and although it needn't need DF as a focus, why not?
(I might suggest both a thread-title change and a move out of this DFish sub-forum to one of the more General ones, to allay confusion, but that's not really my place to say...)
Yep. Long way to go. I was wondering what happened to the <i> tags.
They still work (too well!...notice how they 'leak' through the BBCode, and I've had to insert a [nobbc] tag, above, like I had to edit into
my original reply) but they're discouraged ('deprecated') in later versions of the HTML standard.
That's because people were using italics to
emphasise words, like that, but there was a drive to apply proper meaning to the tags so that emphasised words were clearly marked as emphasis (rather than
de facto foreign phrases, or the like) and so the em-tag was brought in to cover that, and others that might cover other cases, and everyone was expected to stress words with em-tags (that may not even
be rendered as italics, depending on the renderer) and other things with other tags or formatting hints.
Of course, it largely didn't work. People tended to stick to the italic-tags for italics (whether emphasis, foreign phrase insertion or unquoted 'voices in the head' in dramatic form) or switched to the 'proper' em-tag for everything they wanted italicised (regardless of it being emphasised or not!). The
correct solution is to either go into eXtensible Markup Language (XML) territory and seperately define your own <foreign></foreign> tags or (easier, but you're still not there yet) use a span-tag with an id of 'foreignish' (or whatever you want to call it) and then in the stylesheet set style as actual and explicit italics for any spans it finds with a foregnish id to them.
Or in your case, whatever description you would best think to apply to the stylistc description you are making. Such as 'description', 'dwarfdesc' or similar.
But that probably makes no sense, yet! It will later, I'm sure.
For now, continue with what you have. Depending on what browser you use, you might also find an HTML-Validator plugin that you can use to check your own/another page. It won't help you write
neat HTML (you've already got that covered, or at least you could have done a lot worse!) but you can sneak a peak at warnings and advice it gives you (e.g. "Italics tag is deprecated, consider using Em tag instead", assuming you slipped back into that mode) and perhaps see what you might want to change. Also (even if the browser handles it Ok) highlighting tags opened but not closed (or vice versa, or both because of an unfortunate typo/half-edit!) that might cause confusion when you expand the page. (Like suddenly get run-on italics.)
so perhaps when I get to the CSS sheets I'll find a better way to do things.
You will, don't worry.