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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...