hermionesviolin: image of Glory from Buffy with text "at least I admit this world makes me crazy" (crazy [lavellebelle])
Elizabeth (the delinquent, ecumenical) ([personal profile] hermionesviolin) wrote2006-03-12 01:02 am
Entry tags:

learn something new every day

zomg I hate rich text option in LJ. I tried it out 'cause I already had a draft in Semagic and figured I'd save time not hand coding the bolds. Yech. em for italics ("emphasis") and strong for bold. And they do this weird <br /> shit for line breaks. And it's so hard to edit. And I couldn't see any way to move it back to regular edit. *stabs* (I c&p-ed into Semagic, deleted the entry, recoded, then c&p-ed back. So not a timesaver. A mistake I will never repeat.)

Technically....

[identity profile] carpdeus.livejournal.com 2006-03-12 01:00 pm (UTC)(link)
The preference is to use <em> and <strong> over <i> and <b>.

In addition, XHTML (the next version of HTML) will require that every element either have a closing element (ie, <p> has a matching </p> or that it show that it is a stand alone element by including a / at the end of the element (<hr /> instead of <hr> or <br /> instead of <br>).

Now, in Semagic you can go into a rich text mode which I do occasionally but then I switch it back to HTML so I can edit it correctly.

Re: Technically....

[identity profile] hermionesviolin.livejournal.com 2006-03-12 05:41 pm (UTC)(link)
Why the preference for "em" and "strong" over the intuitive and already-used-in-wp "b" and "i"?

Lack of a closing element already wonks up pages, so what will XHTML do? Nullify the unclosed element? I would hope they could make the system smart enough to know (e.g. by programming it with knowledge of the exceptions) when items are stand-alone elements so one doesn't have to do extra coding to indicate that.

Re: Technically....

[identity profile] carpdeus.livejournal.com 2006-03-12 06:19 pm (UTC)(link)
Ok, a little history lesson.

HTML was originally designed to be able to render text with formatting though a common, human readable means. <i> and <em> are technically different, but people tend to use them the same way. But they are not.
Since the italic and emphasis elements have the same appearance, why use one rather than the other? As with <b> and <strong>, one is an element intended for visual formatting and the other is a logical element. <i> tells the browser, "Show this text in italics". <em>tells the browser, "This text is important information, or a piece ofspoken dialogue that carries extra stress." The italic effect typicallyapplied to <em> elements is simply a visual representation of the tag's logical meaning.

Though their visual appearance is the same, italics and logicalemphasis might well have different meanings to surfers using nonvisualbrowsers. A speaking browser, reading text aloud to a blind visitor,would know to lay emphasis on words marked with <em>. <i>, however, might have no effect since its purpose is visual.

<em> should ideally be used for any text that carries logical stress (i.e. if the voice would change when reading the text aloud). <i>should be reserved for elements that are simply to be distinguishedvisually from the surrounding text (e.g. foreign language phrases, orepigraphs at the head of stories).
Now, HTML knows that there are two types of elements, paired tags and single tags. A paired tag says, "Start formatting this way until you encounter the end element, such as turning italics on until an ending </i> element is encountered. But there are other elements like <br> or <hr> that tell the formatting engine to take an action here and now and then be done with it.

This is different from XHTML which is an XML version of HTML and requires that documents be well-formed (and valid but that's another whole topic). A well-formed document is one in which each element has a closing element. Technically that means that a line feed would need to be written as <br></br>. Instead, you can use a short hand to tell the XML processor that there is no closing element by including the / at the end of the element, making <br />.

The reason behind XHTML is to make it easier to dynamicize web content. If you're really interested, I'll dig up a better and more in-depth history lesson for you.

[identity profile] sangerin.livejournal.com 2006-03-13 08:01 am (UTC)(link)
Not stalking! Just that you keep posting about things that I want to comment on. (Although, note my good behaviour in not asking about the United Church of Christ comment in another post. I am being good. Sort of.)

Anyway - I agree: I once made the mistake of switching formats in Semagic, and I'll never repeat that mistake. Unfortunately, today during the day I wrote a sizeable post and emailed it home to post it with a few edits (working on them now), but when I cut and paste from the email to Semagic, all the line breaks translated and I now have to take them all out. Which is a pain.

[identity profile] hermionesviolin.livejournal.com 2006-03-13 02:20 pm (UTC)(link)
Hey, commentage is always welcome. (And dude, we're mutually flisted. It's hardly stalking.)

[identity profile] sangerin.livejournal.com 2006-03-13 07:57 pm (UTC)(link)
I was just feeling like I was commenting an awful lot on your recent posts.

Yeah, it was the FUCC - I just was confused by it, that's all. I spent a lot of time with the UCC delegates at the WCC Assembly (partially because delegations were seated alphabetically, so we were in with the United Reformed Church (UK), United Methodists and the United Churches of Christ and United Church of Canada).

[identity profile] hermionesviolin.livejournal.com 2006-03-13 08:48 pm (UTC)(link)
Well mostly I get (silently) whiny that nobody comments on anything. I'm always glad to actually be conversing with people -- especially when I post thinky stuff.