I want to align the text as follows using DIV and SPAN but couldnt:
ABC1 ABC2
XYZ1 XYZ2
My HTML with internal CSS is as follows:
<html>
<head>
<title> This is Page Title </title>
<style>
span {display:block;}
div {display:inline;}
</style>
</head>
<body>
<div class="x">
<span class="a">ABC1</span>
<span class="a">XYZ1</span>
</div>
<div class="y">
<span class="b">ABC2</span>
<span class="b">XYZ2</span>
</div>
</body>
</html>
and its output is as follows:
ABC1
XYZ1
ABC2
XYZ2
Would appreciate any help, Thanks.
Change the CSS to