[edit: Well, I'll be. That's
<a href=http://www.link.com>test</a>
which I didn't think was supposed to work. Anyone know why it does anyway?]
'War Stories'
Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.
[edit: Well, I'll be. That's
<a href=http://www.link.com>test</a>
which I didn't think was supposed to work. Anyone know why it does anyway?]
Not using quotes is, IIRC, deprecated. Quotes are recommended (and hopefully soon mandated for the forgetful among us == me) for all attributes. They are currently mandatory for any attribute with a space or other special thingy in them.
t font face="Arial Rounded MT Bold" for instance, although one should say t font face="Arial" and not t font face=Arial .
Ah -- I thought they were mandatory for all attributes already.
Actually, in both cases, it will display
Horner John ThatAussieNetwork
</nitpick>
Thanks. Now corrected.
Ah. So I should being using quotes for everything after an =, then? So for font color as well?
Yup.
Thanks for that PHP stuff Gar, I did actually know that you can use arrays in order and as associative arrays, but coming from a Perl background where one has to be a @ and the other has to be a %, it freaks me out when everything's a $.
It's like that Stephen Wright gag about the thermos: put something hot in it, it keeps it hot, put something cold in it, it keeps it cold -- but how does it know?
OK the thing about whether stuff gets enclosed in quotes?
Technically speaking, it's about what type of characters are in the attribute's value.
[for people who may not know the terminology -- in <font color="white"> "font" is the tag, "color" is the attribute, and "white" is the attribute's value.]
If you do a syntax check, you'll get an error message for
width=50%
but not for
width=50
because "50" contains alphanumeric characters only, but the per cent sign isn't alphanumeric.
Similarly, you'll get an error for:
font color=#ffffff
but not
font color=white
for the same reason, which kind of seems wrong to me.
But this only applies to non-strict versions of HTML only, like the one we use here. Other versions require much more rigour and everything to be in quotes. Plus it always comes down to the browser's level of forgiveness anyway. Your browser might be happy with it, but not someone else's.
So ita's right, of course, always enclose things in quotes, yes. But please use the same ones at the end you use at the start...
Okay. Using quotes, and using them twice. Got it.