w3C error when h1 goes to 90%

(Tom) #1

Why do I get an error on W3C Test when I set the h1 from 100% to 90%? Whenever I change the %, an error appears.

Error: Element h1 not allowed as child of element span in this context. (Suppressing further errors from this subtree.)

From line 130, column 488; to line 130, column 491


(Jannis from inStacks Software) #2

Hi, do you have a link?

(Tom) #3

Here is the link. When I set it to 100% the error disappears…

(...) #4

The only guess I can make right off the top of my head is this. The h1 tag by definition is the largest most important element on the page. Making it 90% makes it appear to be less, even if it isn’t.

(Tom) #5

Thank you. But it also appears if I set the text to 90%. No matter on which Text I use it, an error appears.

(Tom) #6

Something is definately wrong with stacks. When I ajust the text without stacks, no error appears.

(Doug Bennett) #7

We would need a link to a page when it’s broken. Then link above is after you set it back to 100%. Also might help if you gave us what stack(s) your using and how your changing the size.

(Tom) #8

Now it is broken. You might check it again.

(Doug Bennett) #9

I took a quick look at your site. The syntax error I’m seeing is related to a text stack that has a<span> in it to set the font size to 110%. It then has an unordered list within the span. Don’t know how you’re setting the 110% but you’re not suppose to have a UL within a span.

(Tom) #10

Hi Doug, thank you. This is cliear so far. But why can I change the text everywhere but not the list?

(Doug Bennett) #11

You can change it just not with a <span> element. From an HTML prospective you could use a <div> or a <section> to wrap your list to apply the class, you can even put the class on the <ul> tag.
The span element is an inline element, intended to be used within a paragraph or header, not to contain block level elements. You could use a span for a list but would need to apply it to each bit of text <li> within the list <ul>.