Did you know about html semantics?

Many new webmasters do not fully understand the semantical mark-up tags used in html. Because the various tags are given default font sizes many inexperienced users misuse the tags. This page explains the proper use of html's semantic mark-up tags.

Getting the Emphasis Right

HTML,the language of the web, is a semantic markup language. Most of us view an html document as it is rendered in the view port of our browser. There are browsers that are text only and there are screen readers for the visually impaired. The search engine spiders only deal with the html text that is the basis for the content on your page.

Viewing through the view port can give some visual clues as to the importance of a given piece of content. Larger font will call attention to a given line, or bold or italic fonts may be used. The layout of the page can offer some hints about the importance of a line.

The text only options do not offer the visual clues. There are several tags within the html language that provide the necessary clues as to the importance of the content. These give order to what would otherwise be plain text. A screen reader may use inflection or a pause to call emphasis to the tagged text.

What Are the Semantic Tags?

The tags used to denote importance of text are h1 through h6 and p. H1 is the most important subject on the page and should be used for the page title. H2 through h6 denote categories in descending order of importance. The p tag, or paragraph, is used for the majority of the content. Untagged content (body text) has no real place in an html document.

How Are the Tags Used?

To get a feel for the proper usage of the tags think of the table of contents and content of a text book. The h1 tag would be the title of the book. The h2 tags would be the chapters in the book. H3 through h6 would be descending sections and sub-sections of the various chapters. The content of the various sections would be paragraphs of text within the p tags.

There should only be one h1 tag per page. Using the h1 tag for the site name is not appropriate in most cases. The site name should usually be in a styled p tag. The tags should use the page keywords as part of your on page SEO. They should provide the proper hierarchy for the content of the page.

While there is a default value set for font size in the browser and in the web editor these can be overridden by values that you set in the stylesheet. You could have all the h tags display at the same size and not loose the value of the mark-up. You can also set up classes in the stylesheet so that when applied to a p tag there will be a visual difference.

Do you want to own a Website?

Has this information been helpful?

Comments (0)

Speak to Us

Your name (required, minimum 3, maximum 255 characters) (checked.gif Remember)
Your message (required, minimum 3, maximum 15000 characters)
Please type these letters into the box below: KaSJ (required, case-sensitive)
Drag the slider to the right (required)
privacy policy | terms of service | about us