This code creates a white “Example A” of h2 size heading and a white “Example B” h2 size heading.
The code also causes errors in the code for Example B:
line 99 column 5 - Warning: missing </a> before <h2>
line 99 column 60 - Warning: inserting implicit <a>
line 99 column 113 - Warning: discarding unexpected </a>
Why isn’t the purple color of the H2 for Example A being picked up?
When I fx the warning errors I get a white h2 font.
An <a> tag is an inline tag while a <h2> is a block tag. You must close any inline tags before you start a block. Try moving the <a> inside the Mh2>
Note that it is proposed to change <a> so it can work as a block tag in HTML 5 but browsers are unlikely to have fully implemented that yet - particularly with regard to the application of CSS.
Felgall - I have that in the first line.
Ralp - Ok. So If I have links as one color and H2 another color, how can I make an H2 a link yet keep its color?