Forum Moderators: open

Message Too Old, No Replies

The Semantic Web

not a heading, not a paragraph....

         

Tonearm

4:57 pm on Apr 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello! I'm trying to get down with the semantic web, and I'm not sure what to tag a line of text if it's not a paragraph or heading. This would be something like the time or a label etc. Is there a tag for stuff like that?

- Grant

Purple Martin

11:48 pm on Apr 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd probably use <p> for that. There's nothing semantically wrong with short single line paragraphs.

Other possible tags to consider (depending on the circumstances):

<blockquote> Defines a long quotation
<cite> Defines a citation
<code> Defines computer code text
<dfn> Defines a definition term (e.g. scientific name)
<pre> Defines preformatted text (usually monospaced)
<q> Defines a short quotation
<samp> Defines sample computer code

Tonearm

12:38 am on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Purple Martin -

Thanks for the info. I wouldn't even be using complete sentences. <p> is the way to go anyway?

Purple Martin

1:32 am on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it's just one of them, yes probably. If you want you can style it with CSS.

If you've got several all one after the other, maybe it's a list and needs <ul>? You can of course still style it with CSS.

mattur

5:24 pm on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just to be clear tonearm: div and paragraph markup have nothing to do with the Semantic Web.

If you're interested in the Semantic Web you should be looking at RDF not (X)HTML.

brucec

6:37 pm on Apr 5, 2004 (gmt 0)

10+ Year Member



Can somebody please fill me in on Semantic Web? I never heard of it, but it sounds interesting.

Any explanation or link would do.

Tonearm

8:43 pm on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe I've gotten my terms mixed up. What I mean by the Semantic Web is laying out your page's code so a computer would be able to figure out what it's about.

drbrain

8:53 pm on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mattur: HTML markup has just as much to do with the Semantic Web as RDF does.

mattur

11:18 am on Apr 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The Semantic Web is a somewhat nebulous idea where information on web pages is given well-defined meaning to enable reasoning, querying and constructing logical relations between concepts.

So the choice of div or p does not really matter: either way the markup is not semantically rich enough to say what the div or p means. Is it a product description, a disclaimer, an advert or a lump of marketese? You can't tell, and neither can a computer. (X)HTML markup is purely structural, presentation-level information.

Confusion arises due to the widespread use of the term "semantic markup" which has come to mean using the most appropriate (X)HTML tag for a page element, if an appropriate tag exists. IMHO "structural markup" is a better term to use. Many (most?) folks now think "semantic markup" makes the content compatible with the "Semantic Web" - just because they use the same word. It doesn't, the Semantic Web is a *lot* more complex than that.

A simple sentence like "Our company sells widgets" on the Semantic Web would need to be marked up to identify which company the assertion refers to, what "sells" means in this context, and what "widgets" are. Current (X)HTML can't do this: it's a semantically-poor format.

Adding another sentence "Our company is located in London" (with "our company", "located" and "London" explicitly defined) would theoretically enable Semantic Web users to query for "all companies located in London who sell widgets" and find the company's site. Hopefully the limitations and potential for abuse of this approach are self-evidently clear even with such a simple example.

(BTW there should be a big "As I Understand It" attached to all the above ;))

See:
Semantic Web in Scientific American [sciam.com]
W3c's Semantic Web info [w3.org]

g1smd

7:51 pm on Apr 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



But it is a good start along the semantic road to just start thinking about marking up content as headings, paragraphs, lists, tables, and forms, and styling those from an external CSS file, rather than using the code bloat of <br><br><br><br><br> and single-pixel images to space things out.