forked from zynfly/cpphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (24 loc) · 641 Bytes
/
Copy pathmain.cpp
File metadata and controls
30 lines (24 loc) · 641 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
#include "cpphtml/cpphtml.hpp"
#include <fstream>
using namespace cpphtml;
int
main()
{
auto page = html(
lang_("zh-cn"),
head(
meta(charset_("utf-8")),
meta(http_equiv_("X-UA-Compatible"), content_("IE=EDGE")),
meta(name_("viewport"), content_("width=device-width, initial-scale=1")),
title("Test Page")
),
body(
div(
h1("Hello,World!")
)
)
);
std::cout << page() << std::endl;
return 0;
}