Jump to content
rizwansyed

text in horizontal line

Recommended Posts

Expand upon as necessary ...

	<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title> HTML5 page </title>
<style>
 span { background-color: red; color: white; text-align: center; font-size: 2em; display: inline-block; width: 20em; }
</style>
</head>
<body>
<span> Hello world! </span>
</body>
</html>

 

Share this post


Link to post
Share on other sites

	<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title> HTML5 page </title>
<style>
 span {
   background-color: red;
   color: white;
   text-align: center;
   font-size: 2em;
   display: inline-block;
   width: 20em;
 }
</style>
</head>
<body>
Message <span> Hello world! </span> contents
</body>
</html>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×