Index: trunk/cli/html.ml
===================================================================
--- trunk/cli/html.ml	(revision 56)
+++ trunk/cli/html.ml	(revision 59)
@@ -32,6 +32,6 @@
         in
         let footer = match htm.templates.footer with None -> "" | Some x -> replace x in
-        Printf.sprintf "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<link rel=\"icon\" href=\"/favicon.png\">\n<title>%s%s</title>\n%s\n%s\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">\n</head>\n<body>\n%s%s%s</body>\n</html>"
-        text_title (if site_title <> "" then (" • " ^ site_title) else "")
+        Printf.sprintf "<!DOCTYPE HTML>\n<html>\n<head>\n<link rel=\"icon\" href=\"/favicon.png\">\n<title>%s%s</title>\n%s\n%s\n<meta name=\"generator\" content=\"Logarion\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n</head>\n<body>\n%s%s%s</body>\n</html>"
+        text_title (if site_title <> "" then (" &bull; " ^ site_title) else "")
         htm.style
         (if feed <> "" then Printf.sprintf "<link rel='alternate' href='%s' type='application/atom+xml'>" feed else "")
@@ -60,5 +60,5 @@
         let authors = Person.Set.to_string text.authors in
         let header =
-                let time x = Printf.sprintf {|<span class="%s">%s</span>|}
+                let time x = Printf.sprintf {|<time datetime="%s">%s</time>|}
 (Date.rfc_string x) (Date.pretty_date x) in
                 let topic_links x =
@@ -73,5 +73,5 @@
                 let Rel.{ref_set; rep_set; _} = try Rel.Id_map.find text.id conversion.relations with Not_found -> Rel.empty in
                 ref_links ref_set, ref_links rep_set in
-                "<dl>"
+                "<article><header><dl>"
                 ^ opt_kv "Title:" text.title
                 ^ opt_kv "Authors:" authors
@@ -84,6 +84,6 @@
                 ^ opt_kv "Referred by:" references
                 ^ opt_kv "Replies:" replies
-                ^ {|</dl><pre style="white-space:pre-wrap">|} in
-        wrap conversion htm text.title ((T.of_string text.body header) ^ "</pre>")
+                ^ {|</dl></header><pre style="white-space:pre-wrap">|} in
+        wrap conversion htm text.title ((T.of_string text.body header) ^ "</pre></article>")
 
 let to_dated_links ?(limit) meta_list =
@@ -96,5 +96,5 @@
                         List.rev @@ reduced [] 0 meta_list in
         List.fold_left
-        (fun a m -> Printf.sprintf "%s<li>%s&ensp;<a href=\"%s.htm\">%s</a></li>" a Logarion.(Date.(pretty_date (listing m.Text.date))) 
+        (fun a m -> Printf.sprintf "%s <li> %s <a href=\"%s.htm\">%s</a>" a Logarion.(Date.(pretty_date (listing m.Text.date))) 
         (Logarion.Text.short_id m) m.Logarion.Text.title)
         "" meta_list
@@ -107,7 +107,7 @@
 let fold_topic_roots topic_roots =
         let list_item root t = "<li>" ^ topic_link root t in
-        "<h2>Main topics</h2>"
+        "<nav><h2>Main topics</h2>"
         ^ List.fold_left (fun a x -> a ^ list_item x x) "<ul>" (List.rev topic_roots)
-        ^ "</ul>"
+        ^ "</ul></nav>"
 
 let fold_topics topic_map topic_roots metas =
@@ -124,13 +124,13 @@
                 then topic_link root t else String.capitalize_ascii t in 
         "<ul><li>" ^ item ^ sub_items root t ^ "</ul>" in
-        "<h2>Topics</h2>"
+        "<nav><h2>Topics</h2>"
         ^ List.fold_left (fun a x -> a ^ list_item x x) "<ul>" (List.rev topic_roots)
-        ^ "</ul>"
+        ^ "</ul></nav>"
 
 let text_item path meta =
         let open Logarion in
-        "<p>" ^ Date.(pretty_date (listing meta.Text.date))
-        ^ {|<a href="|} ^ path ^ Text.short_id meta ^ {|.htm">|} ^ meta.Text.title
-        ^ "</a></p><br>"
+        "<time>" ^ Date.(pretty_date (listing meta.Text.date))
+        ^ {|</time> <a href="|} ^ path ^ Text.short_id meta ^ {|.htm">|} ^ meta.Text.title
+        ^ "</a><br>"
 
 let listing_index topic_map topic_roots path metas =
@@ -150,11 +150,11 @@
         | "" -> ""
         | x -> {|<h2 id="|} ^ topic ^ {|">|} ^ String.capitalize_ascii topic ^ "</h2>" ^ x in
-        "<h1>Texts</h1>" ^ item_group topic_roots ^ ""
+        "<nav><h1>Texts</h1>" ^ item_group topic_roots ^ "</nav>"
 
 let topic_main_index conv htm topic_roots metas =
         wrap conv htm "Topics"
         (fold_topic_roots topic_roots
-        ^ "<h1>Latest</h1><ul>" ^ to_dated_links ~limit:10 metas
-        ^ {|<p><a href="index.date.htm">More by date</a></p>|}
+        ^ "<nav><h1>Latest</h1><ul>" ^ to_dated_links ~limit:10 metas
+        ^ {|</ul></nav><hr><a href="index.date.htm">More by date</a>|}
 ^ let peers = try Logarion.Store.KV.find "Peers" conv.kv with Not_found -> "" in
 (if peers = "" then "" else
