diff --git a/djota.pl b/djota.pl
index ae0b3a3..af73fa5 100644
--- a/djota.pl
+++ b/djota.pl
@@ -357,7 +357,7 @@
ast_html_node_(section(N, Header, Child, Attrs)) -->
{ phrase(ast_html_(Child), ChildHtml) },
{ attrs_html(Attrs, AttrsHtml) },
- format_("", [N, AttrsHtml, Header, N, ChildHtml]).
+ format_("", [AttrsHtml, N, Header, N, ChildHtml]).
ast_html_node_(blockquote(Child, Attrs)) -->
{ phrase(ast_html_(Child), ChildHtml) },
{ attrs_html(Attrs, AttrsHtml) },
diff --git a/test.lgt b/test.lgt
index c00434d..dcddc92 100644
--- a/test.lgt
+++ b/test.lgt
@@ -115,6 +115,6 @@ test(table) :-
djota:djot("| ```~`Ct``` | 1 |", "
").
test(block_attributes) :-
- djota:djot("{#water}\n# Coffee\n\nCoffee is perfect", "").
+ djota:djot("{#water}\n# Coffee\n\nCoffee is perfect", "").
:- end_object.
\ No newline at end of file