Home arrow Style Sheets arrow Combining Divs and H1 Elements to Include Logos in Web Pages
STYLE SHEETS

Combining Divs and H1 Elements to Include Logos in Web Pages


In this second tutorial of a series, I implement a simple, effective method for displaying a sample logo in a web page while preserving its semantic meaning. This process involves the use of a div and an H1 header, which is a more effective approach, as this last element is utilized in most cases to show the name of a web site (or of the pages which it comprises).

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
April 13, 2010
TABLE OF CONTENTS:
  1. · Combining Divs and H1 Elements to Include Logos in Web Pages
  2. · Review: using a linked img element to include a logo in a web page
  3. · Embedding a logo using a wrapping div and an H1 element
  4. · Completing the example with CSS styles

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Combining Divs and H1 Elements to Include Logos in Web Pages
(Page 1 of 4 )

As with other HTML elements, the inclusion of a logotype in an (X)HTML document is a process that should be accomplished carefully, without breaking the document's semantic structure. Very often, web designers who are taking their first steps in the field think that displaying a logo is similar to working with an ordinary inline image. Unfortunately, this is a mistaken idea. A logo is a visual representation of the name of a website, and therefore its presence must be reflected differently in the site's markup.

The good news is that currently there are a few simple approaches that permit you to display a logo in a web page, while keeping its semantic meaning untouched. Most of these techniques rely strongly on the functionality provided by image replacement methods (IR). If you're not familiar with the inner workings of IR, don't feel concerned, because in this series of articles you'll learn how to use it, in this case for correctly embedding your carefully-designed logo in your website.

In the introductory part of the series I implemented a couple of "quick and dirty" methods that demonstrated how to include a sample logo in a web page first by using only a linked <img> element, and then by adding an extra wrapping div to this element. Even though putting these approaches to work was really a breeze, the truth is that they suffer from some serious issues. They still base their functionality on an <img> tag, which is incorrect from a semantic point of view.

Is there anything better that can be used to include a logo in a more appropriate way? The answer is a resounding yes! If a logo is the visual representation of a website's name, then it should be included directly via an H1 element, which is the top most heading element of a web page.

In keeping with this concept, in this second episode of the series I'm going to demonstrate how a proper combination of a div and an H1 tag can be of great help for semantically embedding a logo in an (X)HTML document.

Now, click on the link below and start reading!


blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials