"><section id="index"><h2>Getting started with j2html</h2><p>Import TagCreator to get started. j2html&#x27;s syntax is fluent and closely matched to HTML:</p><pre><code class="language-java">import static j2html.TagCreator.*;

public class Main {
    public static void main(String[] args) {
        body(
            h1(&quot;Hello, World!&quot;),
            img().withSrc(&quot;/img/hello.png&quot;)
        ).render();
    }
}
</code></pre><p>The Java code above becomes the HTML below:</p><pre><code class="