Home arrow Style Sheets arrow Using a Single H1 Element to Include Logos in Web Pages
STYLE SHEETS

Using a Single H1 Element to Include Logos in Web Pages


In this third part of a series, I demonstrate how easy it is to display a logo in a web page by using an H1 header element. This approach allows you to preserve the page's semantic meaning.

Author Info:
By: Alejandro Gervasio
Rating: 3 stars3 stars3 stars3 stars3 stars / 5
April 14, 2010
TABLE OF CONTENTS:
  1. · Using a Single H1 Element to Include Logos in Web Pages
  2. · Review: displaying a logo in an (X)HTML document using a wrapping div and an H1 header
  3. · Using a single H1 element to include a logo in a web page
  4. · Coding some additional CSS styles

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Using a Single H1 Element to Include Logos in Web Pages
(Page 1 of 4 )

If you're a conscientious web designer who wants to learn how to display a logo in your website (or your client's) without sacrificing the pristine and semantic meaning of the structural markup, then look no further. In this article series I'm going to show you how to achieve that seemingly complex task by using a simple combination of common HTML elements, such as divs and H1 headers and a pinch of CSS.

Of curse, if you already had the chance to take a peek at the two previous installments of the series, then at this point you have a clear idea of how to  semantically embed a logo in an (X)HTML document by utilizing a wrapping div along with an H1 element. This approach is very easy to implement and permits you to display the logo as a background image (instead of using an <img> tag), while its semantics are neatly preserved via the ID assigned to the containing div.

While the advantages to using a method like this become evident, the truth is that this approach can be enhanced even further. Considering that the wrapping div and the H1 header are both block-level elements, it's possible to get rid of the pertinent div (that sounds a bit cruel, I know) and use only the H1 tag to display the logo and preserve its semantic meaning at the same time.

Since implementing this improvement requires only a minor effort, in the next few lines I'm going to explain the theoretical aspects of this process. As usual, I will include a decent number of practical examples.

Ready to learn how to semantically include a logo in a web page using a single H1 element? Then begin reading right now!


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 10 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials