I need some intermediate HTML code help...?

co co

New member
Can I have text on the same column, but have a different alignment? For example, how would I go about doing this (the right way. cause this way doesn't work.)

<html>
<head>
<title> Title Here </title>
<body>
<align="left"> "Text 1 here (This is aligned LEFT)!" </align> <align="right"> "Text 2 here! (This is aligned RIGHT)" </align>
</body>
</html>

That is essentially what I want. I hope it makes sense. Can this be done?
</html>
 
Easy. Just use this code:

<html>
<head>
<title> Title Here </title>
<body>
<span style="float:left"> Text 1 here (This is aligned LEFT)! </span> <span style="float:right;"> Text 2 here! (This is aligned RIGHT) </span>
</body>
</html>

You could also try this code:

<html>
<head>
<title> Title Here </title>
<body>
<div align="left"> Text 1 here (This is aligned LEFT)! </div> <div align="right"> Text 2 here! (This is aligned RIGHT) </div>
</body>
</html>

Both should work. The first is the most modern because it is using CSS. And, tables are last century. I recommend you don't use tables.

Hope this helps.
 
Back
Top