Problem with very basic html code

Here are some lines of HTML:


<h1 align=“right”> Χ ¥ ζ </h1>
<h2 align="right"> <em> testing</em> </h2>
<hr align="right" width="20%" / size="10">
</hr>


As far as I can tell, all three lines should be right aligned. But when I paste the above into notepad, then save with an htm extension, and open that htm file in Internet Explorer, the first line is not right aligned. Only the second two are.

Any idea what’s going wrong?

-FrL-

The quotes on the H1 tag are smart quotes - left double quotation and right double quotation. You need to replace them with the regular double quotation marks.

You are using “smart quotes” in your first line.

Thanks!

That solves a couple of other weird problems I was seeing. I’m pleased to discover they’re all the same problem.

-FrL-

(Colors weren’t showing up right, images had incorrect dimensions. All because of copy-pasted smart quotes.)

Had you been using MS Word or a similar word processor to do text editing? That’s often the culprit, what with their highfalutin’ automatic quote conversions and whatnot.

Here’s another very basic question.


<a align="right" href="http://boards.straightdope.com"> Straight Dope Message Boards. </a>

What I expect is for the link to appear on the right side of the page, but what I get is a link on the left side of the page. Any pointers?

Thanks,

-FrL-

There is no “align” attribute for the a/link tag. Here’s a list of attributes

Try using the CSS “float” attribute (style=“float: right;”) instead, or putting the link inside a div or a p with align=“right” attribute for the div or p (but that’s a depricated attribute I believe).