Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Valid HTML code
Posted:
8 May 26, 11:51
|
|
|
|
|
Hi Laza,
several years ago I started to include more and lengthier comments for my folders. These comments use HTML and JavaScript. Sample file „2026 02 02 Östersund - Jokkmokk.html“ attached.
I know that my skills of HTML an JavaScript are (very) low. I tried the service under https://validator.w3.org/ sometimes to check my code, but this is only good for checking one or two files, but right now I have more than 500. So recently I found https://html-validate.org/
This works offline and which is important for me the files have not to be „complete“ Neither .html files or component fragments need to be a complete document (e.g. doctype is not required).
When I check my files most of them are fine, but the files JA creates with Tiger have nearly all the same three errors:
D:\Users\My Albums\Master\Norge-T\2026 01 30 Norge\2026 02 02 Östersund - Jokkmokk\index.html
1:1 error DOCTYPE should be uppercase doctype-style
124:7 error <form> element must have a submit button wcag/h32
135:2 error Anchor link must have a text describing its purpose wcag/h30
I also attached such a file (index.html).
What do you think, would it be possbile to fix these kind of low level warnings? I'm aware that these errors are not severe.
Thanks
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: Valid HTML code
Posted:
8 May 26, 14:20
in response to: MarkusD
|
 |
Helpful |
|
|
My go-to validator, Total Validator, doesn't complain about those. That said, DOCTYPE is usually all-caps, for reasons unknown.
There is one thing in the Tiger CSS that it doesn't like, but I've never figured out what the problem with it is. I've tried various encoding variations, but nothing seems to make it happy. The angle brackets, like <svg>, really should be encoded, and perhaps the parens around the rgb values shouldn't be encoded, but that doesn't avoid the error report. Might be a bug in the validator.
In a default settings Tiger album, it's on line 3014 of common.css: background-image contains a url() function with a parsing error. See CSS Backgrounds and Borders Module Level 3.
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill:rgb%28138,138,138%29'></polygon></svg>")
ETA: The Pro version of Total Validator lets you check an entire site in one shot. Checking locally, before uploading, it gets through my entire 600+ page demo site in under a minute. It has rescued me from all sorts of dopey mistakes over the years.
Another ETA: This appears to be a TV bug, and I've reported it to them, after stripping it down to the basics, and doing the recommended encoding of the angle brackets.
|
|
|
Posts:
1,511
Registered:
6-Sep-2005
|
|
|
|
Re: Valid HTML code
Posted:
9 May 26, 12:44
in response to: MarkusD
|
|
|
When I check my Tiger album, I get only "IMG lacks ALT tag" and "SECTION must have H2-H5 tags" errors.
These html-validate bring up, are not real errors, in my opinion, just violations of conventions.
- I can fix the "missing submit button" by adding an invisible one, but that would only be useful to the validator.
- DOCTYPE letter casing is a non-issue, as any tag can be both uppercase and lowercase.
- Anchor links (e.g. buttons) don't always need to have a HREF when they trigger JS functionality.
Edited by: Laza on 9 May 2026, 12:47
|
|
|
Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Re: Valid HTML code
Posted:
9 May 26, 12:51
in response to: JeffTucker
|
|
|
My go-to validator, Total Validator, doesn't complain about those. That said, DOCTYPE is usually all-caps, for reasons unknown.
Jeff, I remember you mentioned TV earlier. I looked at it, but my opinion is, that's too much for me, everything I do is just for fun. HTML-validate is just fits more my needs.
|
|
|
Posts:
867
Registered:
13-Apr-2006
|
|
|
|
Re: Valid HTML code
Posted:
9 May 26, 12:54
in response to: Laza
|
|
|
These html-validate bring up, are not real errors, in my opinion, just violations of conventions.
Yes, that's what I think too. I just thought why not eliminate even such smaller issues to make the code really shine.
Edited by: JeffTucker on 9 May 2026, 08:22 to separate quoted reply
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: Valid HTML code
Posted:
9 May 26, 14:24
in response to: MarkusD
|
|
|
|
As Laza pointed out, they're not actually HTML or CSS errors. They represent only the opinion of the person writing the validator, and different code-checkers have different opinions about things!
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: Valid HTML code
Posted:
9 May 26, 14:29
in response to: MarkusD
|
|
|
My go-to validator, Total Validator, doesn't complain about those. That said, DOCTYPE is usually all-caps, for reasons unknown.
Jeff, I remember you mentioned TV earlier. I looked at it, but my opinion is, that's too much for me, everything I do is just for fun. HTML-validate is just fits more my needs.
Well, it's not cheap, at €46 for a pro license, but the ability to check all of your pages with one click might make that a bargain, depending upon how much your time is worth.
I don't do this for profit, either - the only thing RobM and I get is a free jAlbum license. Well, that, and worldwide acclaim and mobs of adoring fans. 
|
|
|
Posts:
8,335
Registered:
31-Jan-2006
|
|
|
|
Re: Valid HTML code
Posted:
9 May 26, 18:20
in response to: JeffTucker
|
|
|
Another ETA: This appears to be a TV bug, and I've reported it to them, after stripping it down to the basics, and doing the recommended encoding of the angle brackets.
TV got back to me, and this is, indeed, a bug. That said, the way I read the specs, the angle brackets should be encoded, and the parentheses should not. So: background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'%3E%3Cpolygon points='0,0 32,0 16,24' style='fill:rgb(138,138,138)'%3E%3C/polygon%3E%3C/svg%3E")
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|