I was wondering if there would be any problems if I added a list inside a H1 heading:
Header elements like <h1>
follow the phrasing content content model: if you wanted to follow the HTML specification to the letter, phrasing content can only contain regular text or other phrasing content. As <ul>
elements aren't phrasing content, they're technically not allowed in <h1>
elements.
Your second example—placing the <h1>
elements within <li>
elements—is valid markup and would be the preferred method of combining <h1>
and <ul>
elements.
You can use W3C Markup Validation Service to check out whether or not it is valid :)
To answer your original question, no, that doesn't look like a sane thing to do with your markup, and even if it were technically valid (which I don't believe it is) I wouldn't advise doing it.
As for SEO, h1
is used to some degree in search, though I believe it's not as important as the <title>
element. However, if your page doesn't have a heading, semantically-speaking, I certainly wouldn't crowbar one in just to try and improve rankings. Put that "current page" text in the <title>
, if appropriate, make the breadcrumb list a normal breadcrumb list, and don't bother with the h1 if you don't need it.
this would display - however I think it would be considered bad practice as a list is not a header. You'd be better off adding css styling so you could format you list to the desired size, font etc.
It's not valid to have a ul inside a h1, the best way of checking is to use http://validator.w3.org/ to check your structure, that way the doctype you are using will be considered. (but it's still not valid!)