lucabaldini / webpage

My personal (static-html) webpage
GNU General Public License v3.0
1 stars 0 forks source link

Fix HTML validation errors #27

Open lucabaldini opened 5 years ago

lucabaldini commented 5 years ago

As of version 0.0.1 we have a common warning on all pages

    Warning: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.

    From line 22, column 5; to line 22, column 13

    der>↩↩    <section>↩     

This is apparently harmless, and we could probably live without fixing it.

lucabaldini commented 5 years ago

In the cv page we have a bunch of errors on the date custom attribute.

Error: Attribute date not allowed on element li at this point.

From line 71, column 11; to line 71, column 62

          <li class="event" date="Dec. 1, 2017&ndash;present">↩     

Attributes for element li:
    Global attributes
    If the element is not a child of an ul or menu element: value — Ordinal value of the list item

See https://www.sitepoint.com/how-why-use-html5-custom-data-attributes/ We probably have to prepend data- to any custom data attribute.

And I replaced the date custom attribute with data-date. This should be fixed.

lucabaldini commented 5 years ago

In the publication page we seem to have a couple of genuine warnings

Error: End tag article seen, but there were open elements.

From line 391, column 7; to line 391, column 16

li>↩      </article>↩    <

Error: Unclosed element ul.

From line 52, column 9; to line 52, column 37

 ↩        <ul class="publication-list">↩     

Ok, and this is fixed, too.

lucabaldini commented 5 years ago

More genuine errors in the talks page

Error: End tag article seen, but there were open elements.

From line 161, column 7; to line 161, column 16

li>↩      </article>↩    <

Error: Unclosed element ul.

From line 47, column 9; to line 47, column 36

 ↩        <ul class="conference-list">↩     

This should be fixed, too. I also fixed some indentation issue.

lucabaldini commented 5 years ago

Interesting issues in the didattica page:

Warning: This document appears to be written in Italian but the html start tag has lang="en". Consider using lang="it" (or variant) instead.

From line 1, column 16; to line 3, column 16

TYPE html>↩↩<html lang="en">↩↩  <h

For further guidance, consult Declaring the overall language of a page and Choosing language tags.

If the HTML checker has misidentified the language of this document, please file an issue report or send e-mail to report the problem.

Error: Named character reference was not terminated by a semicolon. (Or & should have been escaped as &amp;.)

At line 82, column 26

(Va da s&eacute che, a mio mod

The second was easy and is fixed on a branch. For the first one we need to set the language of a page-by-page basis. That takes some refactoring.

And the language on a page-by-page basis is done too. We should be more or less all set.

lucabaldini commented 5 years ago

I just deployed version 0.4.0 and confirm that the last warning remaining, on all pages, is that on the section lacking header.

Still thinking whether we want to fix this before we close the issue.