Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

j2html

> 前端框架
Open source

Java to HTML generator. Enjoy typesafe HTML generation.

782 stars0 likes2 views
WebsiteGitHub

About

Java to HTML generator. Enjoy typesafe HTML generation.

j2html

Java to HTML generator. Enjoy typesafe HTML generation.

The project webpage is j2html.com.

Getting started

Add the maven dependency

xml

    com.j2html
    j2html
    1.6.0

Or the gradle dependency

compile 'com.j2html:j2html:1.6.0'

Import TagCreator and start building HTML

java
import static j2html.TagCreator.*;

public class Main {
    public static void main(String[] args) {
        body(
            h1("Hello, World!"),
            img().withSrc("/img/hello.png")
        ).render();
    }
}

The above Java will result in the following HTML:

xml

    
Hello, World!

    

Find more examples at http://j2html.com/examples.html

Issues· 28 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javahtml-generatorhtml5javatemplate-engine

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架