Re: QA Tips Error?

On 07/11/2019 12:36, Rimantas Liubertas wrote:
>   
>> I suspect that you are indeed correct; although that way around does
>> seem somewhat counter intuitive - as: inline elements should not
>> contain block elements as per the HTML spec.
> 
> That was true in pre-HTML5 days. HTML5 redefined content models and it is now
> perfectly legal to have 'a' element inside the h1...h6 which expect "phrasing content".

Correct me if I'm wrong, but isn't <a> inline, and <h1>-<h6> block, so 
having a link inside a heading was "legal" even pre-HTML5?

<h1>Foo <a href="...">Bar</a></h1>

But yes, having it the other way around (where the heading is inside the 
link) is now also valid in HTML5 (but that isn't what the QA tip 
suggested, nor what was discussed so far in this thread).

P
-- 
Patrick H. Lauke

www.splintered.co.uk | https://github.com/patrickhlauke
http://flickr.com/photos/redux/ | http://redux.deviantart.com
twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Thursday, 7 November 2019 12:54:11 UTC