diff --git a/examples/hello-name.rs b/examples/hello-name.rs index c6a82aaf..b6f9c113 100644 --- a/examples/hello-name.rs +++ b/examples/hello-name.rs @@ -14,7 +14,11 @@ async fn hello_name( ) -> ResultPage { let name = path.into_inner(); Page::new(request) - .add_child(Html::with(move |_| html! { h1 { "Hello " (name) "!" } })) + .add_child(Html::with(move |_| { + html! { + h1 style="text-align: center;" { "Hello " (name) "!" } + } + })) .render() } diff --git a/examples/hello-world.rs b/examples/hello-world.rs index 64817466..74727ac2 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -10,7 +10,11 @@ impl Extension for HelloWorld { async fn hello_world(request: HttpRequest) -> ResultPage { Page::new(request) - .add_child(Html::with(|_| html! { h1 { "Hello World!" } })) + .add_child(Html::with(|_| { + html! { + h1 style="text-align: center;" { "Hello World!" } + } + })) .render() }