How do I export completely clean HTML5?

Hi,

How do we go about removing any unnecessary styles from LibreOffice and export a pure HTML5 document? I have no interest in meta tags, additional styles, font tags for anything like that. I require a completely clean HTML5 export.

We need to do this because we’re working with Moodle to bring an online course to the internet. We have a standard template for all course pages that work on an inheritance basis. When manually producing clean HTML5 ourselves we just drop it in, link the extra external CSS and it all works.

Being able to customise the way in which LibreOffice 4 exports HTML5 would save us lots of work. More importantly it’s something microsoft word completely fails at.

There exists no filter for export in non-styled HTML5, there is no filter for HTML5 at all. Currently all HTML export is to “HTML 4.0 Transitional”. But have a look at the XHTML export filter. You find it in share/xslt/export/xhtml. If you really only want the document structure, you can make your own filter and add it in Tools > XML filter settings. I have not tested it, but it should be possible to create a HTML5 filter starting with the existing XHTML filter and remove all styling rules.

Or you use the XHTML filter directly and afterwards apply a script to adapt the result to HTML5: exchange the prolog, delete meta-Element, delete style-Element content and add css-import, remove class-attributes.

There might exist an extension or an online service for your task. Have you already look for such?