Reputation: 12957
I want to print Hello MARK
in HTML. If I'm going to assign different styles to both the string using <p>
tag then the text 'MARK' is coming on next line. I want to show as Hello MARK
. So what could be the solution for this issue? Thnaks in Advance.
Upvotes: 0
Views: 151
Reputation: 328
HTML:
<p>Hello <span class="capitalize">Mark</span></p>
CSS:
.capitalize {
text-transform: uppercase;
}
Upvotes: 2
Reputation: 10179
Try display: inline;
:
HTML:
<p>Hello</p>
<p>MARK</p>
CSS:
p { display: inline; }
display:inline
means that the element is displayed inline, inside the current block on the same line.
Upvotes: 7