I want to display the following heading line in HTML:
Hello World HTML Example
"Hello World" is center aligned while "HTML Example" is right aligned. Which HTML element should I use?
I've tried using span element and the display:inline css style but the two phrases always display in two separate lines.
HTML <h4 align="center" > Hello World <span align="right" > HTML Example </span></h4>
Hopefully it's what you're trying to achieve:
<h4 align="center"> Hello World <span style="float:right;"> HTML Example </span></h4>
Good luck!
<h4 align="center" ><span style="float:left;margin-left:30%"> Hello World</span> <span align="right" style="float:right;margin-right:30%"> HTML Example </span></h4>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.