Descendent Elements

When validation my HTML code with the Nu W3C validator it revealed that I was violating the inheritance rules for the Document Object Model.

While the code that I had developed seemed to be functional it turned out that it was inviolation of the rules. What I had done was to add an anchor tag to a button element

The HTML in question

<button class="w3-button w3-pale-green"><a href="design_3.html" style="text-decoration:none"> More Design <i class="fa fa-caret-down"></i></a></button>
Top

The technique used in a different way

While the addition of a hyperlink to a button is a "no no", the addition to a plain text element is okay. I thought that this would be a good enhancement to add when I was looking at code for my Parish Council site.

It is a well accepted notion that clicking on an icon at the top of a page will take you to the home page of the icon clicked. Wordpress.com seems to do this by default.

The real reason

Links

Top

References:

  • The question on stackoverflow.com - https:// stackoverflow.com/questions/ 24837102/the-element-button-must-not-appear-as-a-descendant-of-the-a-element - The element button-must-not-appear-as-a-descendant-of the a element

Site design by Tempusfugit Web Design -