Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

CHTML

Little single header library for generating HTML code.

Original idea from this Reddit post there

Example

This is a little usage example, that generates very simple html code

#include "chtml.h"

int main() {
    HTML_BEGIN()

    HTML("lang='en'") {
        HEAD("") {
            META("charset='UTF-8'");
            // ...
        }
        BODY("") {
            H1("Hello world !");
            P("This is and CHTML example");
            
            for(int i = 0; i < 5; ++i)
                P("You also can use C code there %d like this", i);
        }
    } 

    char* string = HTML_COMPILE();
    printf("%s", string); // Result is just a html code
    free(string);

    return 0;
}

License

CHTML is free and open source library/software. All code in this repository is licensed under

About

little single header library for generating HTML code

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages