WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Headers

for

From: Jukka K. Korpela
Date: Jan 14, 2011 3:15PM


Heather Parker wrote:

> <h1 class="pageMainAreaHeader"> is what I ended up using instead of
> <span class="pageMainAreaHeader">, but I'm getting an extra line
> under the header.

If you switch from, say, <span> to <h1>, which is a good move for the 1st
level heading, then you need to take into account that elements like <h1>
have default formatting. For example, to remove the default bottom margin
for <h1>, looking like an empty line, you can use
h1 { margin-bottom: 0; }
in your CSS code.

--
Yucca, http://www.cs.tut.fi/~jkorpela/