Maybe try this:
<h1 title="Your headline here"><img src="/images/pic.gif" alt="Your headline here" /></h1>
Interesting Nick, thanks .. looks odd to me though why ..
close the alt tag like this?
alt="Your headline here" />
H m m breaks the design at the moment because h1 has a left marg associated with it .. easily fixed though.
|close the alt tag like this? |
alt="Your headline here" />
XML vice HTML
Why not use CSS to define the H1 size?
In xhtml all tags that do not have a natural closing tag like <img> and <br> are written
<img /> <br />.
There are some very interesting threads on the merits of xhtml/css documents on the browsers forum here... check 'em out ;)
mardigras - I have used css to define it but still hate text anti alisasing in 800x600 screens for that size (about 18pt arial) if you compare it to a grapics generated version.
Nick - I guess I had better not mix html and xml yet till I know what i am doing with it :-)
Didnt realise I could embed the image in the H1 tag and get alt text associated as well... does that do more than just an h1 (he hopes)
Hmmm, I was suprised to see responses stating that you could add the image inside the <h1> tag. As much research and testing that I've put into this very important element, I would strongly advise against anything other than...
I think <h1> tags in their simplest form have the most power.
> Will I loose out if I take this other approach for the sake of appearence?
I think so. Others may have a different opinion but I've seen many topics on the <h1> tag and many replies stating that CSS is the best way to get control of it. Adding anything else within the <h1></h1> dilutes the purpose of the tag.
pageoneresults that was exactly my feeling which is why I stopped myself when building some pages in the new format and asked myself what I was doing and why ..
I used for example to regularly have more than one H1 tag per page and have seen someone commenting that there should be only one per page. Whats your opinion on that ?
Heading tags have a specific purpose within a document, not strictly for optimization. They should follow a logical structure and be used appropriately.
"Authors should not choose a heading level based on the font size commonly used by visual browsers. The heading level should be chosen based on the heading's importance and placement in the document. An H1 is typically used as the main heading for a document."
Its all about the structure of the document. I typically use only one <h1> heading once on the page and I follow the same rule you do, matching <title> and <h1> to insure targeted relevancy.
There have been times when I've used <h1>, <h2> and <h3> headings but only when the content justifies it. I believe overuse of the tags can cause problems. I cannot confirm that, but I've read enough to convince me that they should be used sparingly and strategically throughout your web pages.
My opinion is that the <h1> should come right after the <body> tag. This can only be achieved through CSS and Absolute Positioning. You can also do it using a tabled format but the <h1> will appear outside of your first table and be the very first line of text at the tops of your pages. I tried that method a few years ago when working with tables and it did extremely well.
Awful aliasing? What does it look like? I use WinXP at 800x600 and have (control panel, appearance and themes, display, appearance, effects, smooth edges of screen fonts) set to "standard". An h1 with font-family:arial doesn't look bad to me.
I don't understand why Google would penalize you for using an image in your h1 (with good alternate text, of course). Using an image in an h1 shows that you know HTML and that you've designed your sites to be accessible to search engines, people using text browsers, and blind people. The only people who might be hurt by the image are people trying to read your page in another language through an automatic translation service. (If the translation service is really smart, it might replace images that have translatable alt text with their alt text.)
You should base your decision on what looks better: is it better to have a fast-loading page with text that might look bad for some people, or is it better to show that potentially ugly text for only half a second until the image loads and replaces the text?