semantic-markup

What is semantic markup, and why would I want to use that?

Like it says. ...

Semantic HTML markup for a copyright notice

When a web site is licensed under Creative Commons, I use the rel-license microformat. When a web site is licensed under regular copyright, I have a boring paragraph element. <p id="copyright">&copy; 2008 Example Corporation</p> That id attribute on there is just for CSS styling purposes. I'm wondering if there's some better way to ma...

Appropriate use of DL and DD?

I had some site templates designed for me recently. I got the final HTML code, which validates, but the structure of the document is laid out using DL-DD pairs: <dl> <dd class="some-class"> Some text. </dd> </dl> I'm not especially familiar with those tags as I've never used them much, but they don't seem intended for document...

Correct way to write lists

This is something I've pondered over for a while, as I've seen both used in practise. Method 1 <ol> <li>List item 1</li> <li>List item 2 <ol> <li>List item 3</li> </ol> </li> <li>List item 4</li> </ol> This seems semantically correct to me, since the sub-list is a sub-list of that list item...

Semantic HTML for messages

I'm making a small web-chat utility and am looking for advice on which elements to use for messages. Here's what I'm thinking of using at the moment: <p id="message-1"> <span class="timestamp" id="2009-03-10T12:04:01+00:00"> 12:04 </span> <cite class="admin"> Ross </cite> Lorem ipsum dolor sit amet....

Does Google 'understand' microformats and will it help my SEO?

Semantic HTML makes it easier for Google to crawl and 'understand' a website but what about microformats? Are microformats any more semantic/crawlable then standard HTML markup? ...

Captioning an image

What's the neatest way to caption images on the web using the latest in HTML/CSS? Demo code please. ...

What is the best way to markup a testimonial in XHTML?

I used to just use p and span elements for this... but I'm always pushing to use the right elements, and this is something I haven't really thought about before with regard to testimonials. This is what I had in mind <div class="testimonial"> <blockquote>i love your products</blockquote> <span>Jim Testimonial-giver</span> </div> Do...

Do you commonly use Link Relations ("rel" attributes)?

I'm eager to move towards a more standards-based, accessible and semanticly-correct web development approach. At the office, I don't expect there to be huge changes straight away, but I'm trying to start laying down some of the basic foundations for progress further down the track. Part of this process is the introduction of the rel at...

(X)HTML Markup for Book Titles

Should book titles be contained in an <em> tag? If not <em> is there more appropriate markup? ...

Should I make it a priority to semantically mark up my pages? Or is the Semantic Web a good idea that will never really get off the ground?

The Semantic Web is an awesome idea. And there are a lot of really cool things that have been done using the semantic web concept. But after all this time I am beginning to wonder if it is all just a pipe dream in the end. If we will ever truly succeed in making a fully semantic web, and if we are not going to be able to utilize seman...

What data should I care when retrieving only the contents of a HTML webpage?

We all know that the contents of an HTML page aren't just the data between open and closed tags, for example, <p></p>. Beyond image "alt" and any "title" attributes, what HTML offer to me that I should consider as a content? Any suggestions? ...

is a DIV inside a TD a bad idea?

It seems like I heard/read somewhere that DIVs inside of TDs was a no-no. Not that it won't work, just something about them not being really compatible based on their display type. Can't find any evidence to back up my hunch, so I may be totally wrong. ...

What is the best practice for provding a caption, title or label for a list in HTML?

What is the best way to provide a caption for an HTML list? E.g Fuit Apple Pear Orange How should the word "fruit" be handled, particularly if I want it to be semantically associated with the list itself? ...

Why does layout change in IE when UL is alone in a TD vs having an extra empty DIV?

I'm adding css-based tab navigation to a site that is still using table-based layout. When I place my tab list inside a td, there is a visual "gap" that you can see. If I put an empty div with width: 100% in the td, then my tab list displays correctly. (It also works fine outside the table.) Why does the div make the tabs lay out correc...

Is there an easy way to convert HTML with multiple <br/> tags into proper surrounding <p> tags in Javascript?

Let's say I have a bunch of HTML like below: bla bla bla long paragraph here <br/> <br/> bla bla bla more paragraph text <br/> <br/> Is there an easy way with Javascript to convert it to properly semantic <p> tags? E.g.: <p> bla bla bla long paragraph here </p> <p> bla bla bla more paragraph text </p> Output spacing is not impo...

Semantic markup to achieve last row editable effect?

I'm looking to have a table that can be added to by just typing into the last row and clicking on the "Add" button at the end of the row. All other rows in the table can be deleted by clicking on a button in their rightmost column. My problem is that forms can't wrap only one row and validate as XHTML. If I make the form wrap the entire...

Html structure semantics for pages of data

What's the best structure to use when designing a form/ details view for maximum readability (accessibility) and versatility? As an example, the ASP.NET MVC framework's scaffolding creates a fieldset with a legend at the top and all fields in p's (a label and then the input/ editor set). What's the most versatile structure to use, do y...

Suggestion for Semantic Markup

I am creating a web GUI for an application I am working on. This particular section will sit within a larger page that is of a good semantic makeup. However, I am unsure what the best option to markup the below screen semantically. My initial thought is to separate the top half from the bottom half via divs. Therefore, markup for the to...

Is it necessary to use H2 after h1

Is it mandatory to use H2 after h1 if text is too small then can we use h4 after h1 . and is it accessible ? ...