2 replies [Last post]
hollie_goic
hollie_goic's picture
User offline. Last seen 25 weeks 5 days ago. Offline
newbie
Timezone: GMT+11
Joined: 2011-11-18
Posts: 1
Points: 2

I'm in the process of simplifying the html code used in a website that adds about 15 to 20 articles a week. They are basic newspaper article that are between 400 to 2000 words long.

The basic elements of the article can be broken down to: head, sub head, by line, intro paragraph, paragraphs (body of article), long quotes, image, image caption, blurb (usually above the intro paragraph - gives some context to the article), pulled quote, end note (usually source of article, or information on author).

Is there a standard way of grouping these elements.

A lot of them would be obvious such as head <h1>, sub head <h2>, paragraph <p>, etc.

But what about "by line" for example? Would it be better to use say <h3> or <p class="byline">?

The same goes for "intro paragraph" and "end note".

Also is there a general practice of subdividing articles into <div> or <class>?

Or is there no generally accepted way of doing this, as it is too much up to the individual or/and the context?

Tony
Tony's picture
User is online Online
rank Moderator
Moderator
Timezone: GMT+10
Joined: 2003-03-12
Posts: 3794
Points: 1227

Hi hollie_goic, What you need

Hi hollie_goic,
What you need to do is look at each of those areas and think about the semantic meaning of each of them. Or another way of looking at it is, how would you describe them.
Then look at the available html tags and see if any portray the same meaning.

HTML5 doctor has a good element index that should help you find the right tags.

Your question may have already been answered, search and read before you ask.

izidental
izidental's picture
User offline. Last seen 24 weeks 1 day ago. Offline
newbie
Timezone: GMT+8
Joined: 2011-10-17
Posts: 2
Points: 2

Tony wrote: Hi

Tony wrote:

Hi hollie_goic,
What you need to do is look at each of those areas and think about the semantic meaning of each of them. Or another way of looking at it is, how would you describe them.
Then look at the available html tags and see if any portray the same meaning.

HTML5 doctor has a good element index that should help you find the right tags.

Thanks for the information.