How to align text B to right when text a and b are in same line and make text B align to left when it goes to next line because of space constraint
[![<head>
<style>
.text-left {
float: left; /* Float to the left */
}
.text-right {
float: right; /* Float to the right */
}
</style>
</head>
<body>
<h1>Flexible Boxes</h1>
<div class="text-wrapper">
<span class="text-left">abcfdsdfgdfgfdgfrd</span>
<span class="text-right">xyzdsffdgdfgdfgds</span>
</div>
</body>
</html>][1]][1]