Tuesday, 14 April 2020

Re: HTML5 element support

Hi,

Michael Drake <michael.drake@codethink.co.uk> wrote on 14 Apr 2020:

> They work here. What version of NetSurf are you running?

I was using the 3.9 release but following your prompt I downloaded the
test build from yesterday, 3.10 build 5057, and the problem remains.

At least some of my problem can be seen at these 2 simplified test pages:

https://timebus.co.uk/riscos/webtest/using-html4.htm
https://timebus.co.uk/riscos/webtest/using-html5.htm

There are 3 images with captions, separated by 2 horizontal rules for
clarity. The idea (of using inline-block CSS property) is the captions
display to the right of the images if your browser window is wide enough,
otherwise underneath.

The HTML4 one works as I expect, the HTML5 one makes a mess in NetSurf;
the display nests the elements in a cascade. It's almost like NetSurf
fails to recognise the closing figcaption tags.

The only structural difference is that the HTML4 one uses all DIVs,
whereas the HTML5 one uses figure and figcaption elements.

The figure is bordered red, the figcaption is bordered blue.

The HTML4 page has no errors at https://validator.w3.org/
The HTML5 page has no errors at https://validator.w3.org/nu/

Both pages use the same CSS file, which is as follows:

.figure {
margin-bottom: 20px;
border-color: red;
border-style: solid;
}

.figcaption {
display: inline-block;
border-color: blue;
border-style: dotted;

}

.img {
width: 100px;
display: inline-block;
}

If Netsurf is supposed to support HTML5 elements perhaps I should log this
as a bug on the tracker. The development progress page says HTML5 support
is "just started".

Best regards
Ewen

--
Ewen Pring, St. Albans, Herts
using RISC OS 5
https://timebus.co.uk/riscos/

No comments:

Post a Comment