May 26 2008

Bible Markup Pattern: A Proposal

(Also pub­lished at God­bit.)

What is the best way to mark up text from the Bible? I’ve been think­ing about this ques­tion for more than a year, and in that time I have sought an answer, or at least a proposal.

If you’re impa­tient, here are the exam­ples: Exo­dus 20, Psalm 23, Matthew 5, and Matthew 6:5–15.

Caveats

Please remem­ber this arti­cle presents only a pro­posal for con­sid­er­a­tion. I am no the­olo­gian; nor am I a renowned expert on front-end code. Nor does every page of every site I’ve ever built have “best” markup, how­ever I do make every effort to do so.

How­ever, it seems to me that–of all texts in the world–it should be impor­tant to make an effort toward best prac­tices in mark­ing up the Bible.

Of course, I wel­come cor­rec­tions and com­men­tary, any thoughts or additions.

Back­ground

Some good work has been done on cita­tion of online Bible quotes, includ­ing BibleRef and OpenBible.info. There are even some Word­press plu­g­ins for BibleRef.

Bibleref is a sim­ple approach to auto­mat­i­cally iden­ti­fy­ing Bible ref­er­ences [in] web pages.

I use and rec­om­mend BibleRef, which is a foun­da­tional pro­posal that focuses directly on the cita­tion, for exam­ple: <cite class="bibleref">2 Tim 3:16</cite>. All of the present exam­ples use the BibleRef cita­tion format.

But I wanted some­thing more com­pre­hen­sive, that would help with mark­ing up entire bib­li­cal texts or even a whole Bible.

Bibleref is part of a gen­eral move­ment toward markup that expresses more seman­tic, rather than pre­sen­ta­tional, element.

So, my ques­tion is broader than cita­tion for­mat: what ele­ments should we use,
as best practice?

What’s “Best”?

When con­sid­er­ing what may be a “best” way to mark up the Bible, sev­eral require­ments or prin­ci­ples come to mind.

First, it means using (X)HTML in a way that is valid, min­i­mal, and seman­tic. In this case, the term “valid” means essen­tially “meet­ing the require­ments set by the W3C of the spec­i­fi­ca­tion selected by the Doc­type of that document.”

“Min­i­mal” refers to adding as few ele­ments and attrib­utes as rea­son­ably pos­si­ble to the text itself, while pre­serv­ing its structure.

And for pur­poses of this arti­cle, “seman­tic” means a few things: using mean­ing­ful ele­ments that match each por­tion of the text, and com­mu­ni­cate its func­tional mean­ing. In other words, if some text is a pri­mary head­ing, use an <h1> (head­ing) ele­ment; if it’s a para­graph, use a <p> (para­graph) ele­ment; if a block quote, use a <blockquote> ele­ment, etc.

The word “seman­tic” also man­dates gen­eral web stan­dards prin­ci­ples, including:

  • no tables for layout,
  • avoid inline styles,
  • avoid frames,
  • avoid numer­ous <div> and <span> ele­ments (espe­cially those with class attrib­utes that mimic other ele­ments, like head­ings and paragraphs),
  • don’t require JavaScript or Flash.

CMS – Friendly

Another prin­ci­ple for my project is to rec­og­nize the ubiq­uity of the con­tent man­age­ment sys­tem. Most cur­rent con­tent on the web is no longer in sta­tic web pages; rather, it is stored in a data­base and pre­sented dynam­i­cally when some­one asks for it.

So, the four exam­ples I’ve pre­pared are all marked up using the excel­lent Tex­tile syn­tax, the “humane Web text generator”.

Not a Microformat

I sup­port and use Micro­for­mats, but it should be noted that this Bible markup pat­tern is not a Micro­for­mat, and for var­i­ous rea­sons it prob­a­bly never will be.

Cur­rent Practice

I did some research on how some pub­lish­ers and ver­sions are pre­sented on the web, basi­cally by look­ing at as many of these four exam­ples in the four ver­sions that were avail­able on these five sites: Bible Gate­way, Eng­lish Stan­dard Ver­sion, eBible, You­Ver­sion, and WEB Bible.

The markup was about what you might expect from large sites with big con­tent man­age­ment sys­tems. With very few excep­tions, the markup of the pages were all invalid, not min­i­mal, and not semantic.

How­ever, they all at least declared a Doc­type, and com­pared to many enor­mous com­mer­cial sites, most of the markup was rather clean. In fact, almost all used head­ing ele­ments well, and used some arrange­ment of mainly para­graph ele­ments with some class attrib­utes. Depend­ing on the con­tent man­age­ment sys­tem, my impres­sion is that much of this Bible text markup could be much improved with­out undue effort.

Thing One, and Thing Two

Some infor­mal study indi­cates there seem to be two basic seman­tic types or “gen­res” of bib­li­cal text.

The first type can be cat­e­go­rized as prose, and includes para­graphs, lists, and block quotes. The sec­ond type may be called verse, which includes poems, songs, and other lyri­cal matter.

I real­ize this may be gross over-simplification, but when con­struct­ing any tax­on­omy there is a ten­sion in select­ing the num­ber of cat­e­gories. In this case, I pro­pose sim­ply two cat­e­gories, which adds seman­tic rich­ness while being sim­ple enough for this intro­duc­tory article.

The two main gen­res in the Bible are nar­ra­tive and poetry.
Edi­tors’ Pref­ace to the ESV Lit­er­ary Study Bible

Even a sim­ple two-category tax­on­omy can yield pow­er­ful results: pick up a Bible and com­pare Gen­e­sis to Psalms, which con­tain mostly prose and verse respec­tively. It’s obvi­ous they are pre­sented dif­fer­ently, and this basic pre­sen­ta­tional char­ac­ter can be pre­served in the markup.

Exam­ples

As exam­ples of this pro­posed Bible markup pat­tern, it seemed appro­pri­ate to use pas­sages from both Old and New Tes­ta­ments, includ­ing prose, block quotes, and verse.

I selected four texts as exam­ples, which are posted on my blog: Exo­dus 20, Psalm 23, Matthew 5, and Matthew 6:5–15. These pas­sages are also known as the Ten Com­mand­ments, the Beat­i­tudes, the Lord’s Prayer, and … the Twenty-Third Psalm.

Each exam­ple is pre­sented in a dif­fer­ent ver­sion: Exo­dus 20 in the NIV, Psalm 23 in the ESV, Matthew 5 in the WEB, and Matthew 6:5–15 in the KJV.

Overview: The Method

  1. Bible: The first step is sim­ple: a con­tainer ele­ment, such as a <div>, gets a class attribute of “bible”.
  1. Head­ings: The sec­ond step is also easy: Head­ings use head­ing ele­ments, such as <h2>, <h3>, etc.
  1. Para­graphs: Put almost every­thing else in a paragraph.
  1. Block quotes: sur­round one or more para­graphs of a block quote in with <blockquote> and </blockquote> tags.
  1. Verse num­bers and Foot­notes: At first, I thought it would be clever to use ordered lists for the verse num­bers, but that only works if every­one begins all their Bible quo­ta­tions from the begin­ning of a chap­ter. So, verse num­bers are <sup> ele­ments. Sim­i­larly, foot­note ref­er­ence num­bers are </sup><sup> ele­ments with a class attribute of “footnote”.
  1. Verse, Poetry, etc.: As between “prose” and “verse,” I chose to make “prose” the default. If some or all of a pas­sage is verse, then enclose that text with an ele­ment (such as a <span>) with a class attribute of “verse”.
  1. Addi­tional: There are a few addi­tional aspects, includ­ing div ele­ments to enclose multi-paragraph “stan­zas” of verse (see Psalm 23), and the markup of the footnotes.

The Styles

For ease of ref­er­ence, the Bible style infor­ma­tion is embed­ded in the head of the exam­ples, so you can sim­ply view the page source.

In actual use, they should be included in a sep­a­rate CSS file with the other styles for that page. A sam­ple CSS file of the Bible styles is avail­able for down­load.

The Future

Some thoughts for the future:

  • How to markup Selah or a clos­ing Amen? Per­haps class="affirmation"?
  • Ini­tial caps for the chap­ter num­ber, super­sed­ing the verse num­ber of the first verse of that chapter?
  • Per­haps a print stylesheet, for select­ing a slightly dif­fer­ent font stack, or siz­ing the printed text in points.
  • And the one I’m almost afraid to ask, what about class="wordsofchrist"?

Let the dis­cus­sion begin….

This arti­cle is © Mont­gomery 2008. Some rights released with a Cre­ative Com­mons Attribution-NonCommercial-ShareAlike 2.5 License.


Feb 15 2007

A Reading List for Web Designers

Update: Thanks to Mithrill, you can now down­load this entire list, in OPML for­mat. Many feed read­ers will then allow you to import the whole list in one step. Down­load: God­bit read­ing list (OPML, 28kb)

Have some RSS; it’s good for you.”

What’s RSS?”

These are times that demand we learn and grow, just to keep up. So many excit­ing things are hap­pen­ing in the web design com­mu­nity, that it’s hard to know where to start.

As the amount of inter­est­ing con­tent on the web increases, a bunch of peo­ple ask the same question:

Ques­tion: “How can I access, read and man­age all the con­tent I want, from all these web­sites, in one orga­nized place?”

Answer: All that con­tent pump­ing out of each site can be pack­aged in a “feed.” The feeds from all the sites you’re inter­ested in can be man­aged, orga­nized and read with a “feed reader.”

In other words, using a feed reader is like hav­ing your own cus­tomized, auto­mat­i­cally gen­er­ated news channel.

RSS Readers

There are lots of dif­fer­ent feed readers. Some feed read­ers may be inte­grated in desk­top soft­ware, such as your browser or your office pro­duc­tiv­ity suite. Other feed read­ers are freely avail­able online:

In any event, the one I use and rec­om­mend is Newshutch:

What to read?

This is a list of RSS feeds, which is based on the feeds that I read, on top­ics includ­ing the church online, pho­to­shop, web design, etc.

By the way, under­stand that the term “RSS” in itself is a lit­tle ambigu­ous, since a feed can con­form to any one of sev­eral dif­fer­ent stan­dards, some of which have dif­fer­ent names. For sim­plic­ity, the term “RSS” in this arti­cle will refer to all types of feeds generally.

Add to the list

This arti­cle is an exper­i­ment here at God­bit, in that arti­cles are usu­ally writ­ten once, with a lim­ited time period for comments.

Instead, dur­ing the com­ment­ing period, I will update this list based on your input, so that the RSS Read­ing List can be a resource for all.

So, if you have an RSS feed of your own, or one that you read and rec­om­mend, let us know in the comments.

Resource: RSS Read­ing List

Church

Comics

CSS Showcase

Get­ting Things Done

God­bit

Mag­a­zines

  • Note:

My Host

Pho­to­shop

Pop­u­lar Blogs

Web Design

Web Design: Accessibility

Web Design: CSS

Web Design: DOM Scripting

Web Design: Events

Web Design: Infor­ma­tion Architecture

Web Design: Jobs

Web Design: Podcasts

Web Design: Textpattern

Web Apps

This arti­cle is © Mont­gomery 2007. Some rights released with a Cre­ative Com­mons Attribution-NonCommercial-ShareAlike 2.5 License.

Also pub­lished at God­bit.


Oct 18 2005

I Know; I Know

…it doesn’t validate. It doesn’t even come close. _Ugh._

Please con­sider: that I am focus­ing on build­ing other people’s sites, includ­ing Pho­to­s­ByKat and Ellen Car­roll Designs. They aren’t fin­ished, but at least they validate. And the markup can be called semantic. If you’re generous.

If that doesn’t mol­lify the shrill, crit­i­cal voice inside your head, be assured that I’m con­duct­ing a Web Stan­dards Reboot. Which sim­ply con­jures up a spe­cific dead­line of Novem­ber 1 for a new design that com­plies with Web Standards. Arbitrary account­abil­ity — gotta love it.

Oth­er­wise, just be con­tent with admir­ing that fetch­ing new badge down there on the right.


Oct 5 2005

Web Standards Weight Loss

The more I learn about web stan­dards, the more I con­clude that an indi­ca­tor of real skill is how few IDs and classes you need in your markup.

If you can style the whole page, while adding only a few divs (header, footer, nav, content-main and maybe content-sub), now you’ve learned something.

For exam­ple, I took a look at a friend’s port­fo­lio site recently: Life Light.

My first thought was “Okay, it’s a decent look­ing site.”

My next thought was “He did all that with such min­i­mal markup? Whoa.”