Valhalla Legends Forums Archive | Web Development | Re:HTML lesson

AuthorMessageTime
Adron
[quote author=Myndfyre link=board=22;threadid=4629;start=0#msg57376 date=1083190397]
3.) Ensure that all values have assigned values that are in quotes. For example, the iframe tag allows you to define the contant "allowTransparency", making the frame transparent. Proper setting would be:
<iframe allowTransparency="true" />
where it could be without XHTML:
<iframe allowTransparency />
[/quote]

Are values required to always be in quotes now? Previously, <iframe allowTransparency=true /> might've worked too.
April 30, 2004, 12:22 AM
Myndfyr
[quote author=Adron link=board=22;threadid=6566;start=0#msg57677 date=1083284527]
[quote author=Myndfyre link=board=22;threadid=4629;start=0#msg57376 date=1083190397]
3.) Ensure that all values have assigned values that are in quotes. For example, the iframe tag allows you to define the contant "allowTransparency", making the frame transparent. Proper setting would be:
<iframe allowTransparency="true" />
where it could be without XHTML:
<iframe allowTransparency />
[/quote]

Are values required to always be in quotes now? Previously, <iframe allowTransparency=true /> might've worked too.
[/quote]

XHTML requires attribute values to be in single or double quotes, because that is a requirement of XML. XHTML is a specific merger of XML and HTML -- essentially HTML with the rules of XML.
April 30, 2004, 5:24 AM
Grok
[quote author=Myndfyre link=board=22;threadid=6566;start=0#msg57722 date=1083302664]XHTML requires attribute values to be in single or double quotes, because that is a requirement of XML. XHTML is a specific merger of XML and HTML -- essentially HTML with the rules of XML.[/quote]

HTML was "rewritten" in XML, making HTML 4.01 "an application of" XML. XML being an extensible markup language, HTML and XHTML are two of those extensions (among hundreds).
April 30, 2004, 10:37 AM
Adron
But apparently XML can't be extended to support attribute values without quotes :P
April 30, 2004, 1:08 PM
Myndfyr
[quote author=Adron link=board=22;threadid=6566;start=0#msg57736 date=1083330489]
But apparently XML can't be extended to support attribute values without quotes :P
[/quote]

Nope. XML is very strict, but the advantage is that parsers in all kinds of languages are easy to implement.
April 30, 2004, 1:39 PM
Grok
[quote author=Adron link=board=22;threadid=6566;start=0#msg57736 date=1083330489]
But apparently XML can't be extended to support attribute values without quotes :P
[/quote]

hehe ... no, you'd have to redefine XML to allow that, which is different from extending it. You're saying why can't you extend C++ to not need semicolons.
April 30, 2004, 1:51 PM
Adron
[quote author=Grok link=board=22;threadid=6566;start=0#msg57744 date=1083333075]
[quote author=Adron link=board=22;threadid=6566;start=0#msg57736 date=1083330489]
But apparently XML can't be extended to support attribute values without quotes :P
[/quote]

hehe ... no, you'd have to redefine XML to allow that, which is different from extending it. You're saying why can't you extend C++ to not need semicolons.
[/quote]

Hmm, maybe. Or make it not to need ( ) with if. I don't think it would become ambiguous if you removed those, or made them optional?

About the quotes with values, I've just tried to stop writing those for attribute values to save space. And now I need to start writing them again - eww ;)
April 30, 2004, 3:02 PM
Grok
Use VS.NET 2003, and Visual Assist. Your quotes are taken care of for you.
April 30, 2004, 3:19 PM
Yoni
<bleh slashgreaterthan="/>" />

And the ( ) are required in if to make it inherently cooler than basic/pascal.
April 30, 2004, 3:55 PM
Adron
[quote author=Grok link=board=22;threadid=6566;start=0#msg57751 date=1083338394]
Use VS.NET 2003, and Visual Assist. Your quotes are taken care of for you.
[/quote]

That's a rather heavy-weight html editor. I'd prefer being able to code without quotes in notepad ;)

Actually, sometimes visual assist annoys me. I suppose you have to learn to get along with it, so it doesn't keep undoing things you do.
April 30, 2004, 4:18 PM
Myndfyr
[quote author=Yoni link=board=22;threadid=6566;start=0#msg57756 date=1083340515]
<bleh slashgreaterthan="/>" />
[/quote]
Bad idea: xml doesn't allow > token values. Use &lt; .

[quote author=Yoni link=board=22;threadid=6566;start=0#msg57756 date=1083340515]
And the ( ) are required in if to make it inherently cooler than basic/pascal.
[/quote]

[code]
int i = 3;
if i <<= 2 == 81 i -= 3;
[/code]

yuck!
April 30, 2004, 5:33 PM
Yoni
[quote author=Myndfyre link=board=22;threadid=6566;start=0#msg57762 date=1083346380]
[quote author=Yoni link=board=22;threadid=6566;start=0#msg57756 date=1083340515]
<bleh slashgreaterthan="/>" />
[/quote]
Bad idea: xml doesn't allow > token values. Use &lt; .
[/quote]
Oh yeah, good call.

[quote author=Myndfyre link=board=22;threadid=6566;start=0#msg57762 date=1083346380]
[code]
int i = 3;
if i <<= 2 == 81 i -= 3;
[/code]
[/quote]
Hmm, the () could be given up by requiring { } to always appear in the if body. So you have to make some kind of compromise... It's better the way it is now anyway.

Edit: Hmm, how can you left-shift by 2 bits and get a result that isn't divisible by 4? :)
April 30, 2004, 9:32 PM
K
[quote author=Myndfyre link=board=22;threadid=6566;start=0#msg57762 date=1083346380]
[quote author=Yoni link=board=22;threadid=6566;start=0#msg57756 date=1083340515]
<bleh slashgreaterthan="/>" />
[/quote]
Bad idea: xml doesn't allow > token values. Use &lt; .
[/quote]

Looks like &gt; to me :P
May 1, 2004, 4:29 AM
Myndfyr
[quote author=K link=board=22;threadid=6566;start=0#msg57845 date=1083385764]
[quote author=Myndfyre link=board=22;threadid=6566;start=0#msg57762 date=1083346380]
[quote author=Yoni link=board=22;threadid=6566;start=0#msg57756 date=1083340515]
<bleh slashgreaterthan="/>" />
[/quote]
Bad idea: xml doesn't allow > token values. Use &lt; .
[/quote]

Looks like &gt; to me :P
[/quote]

yeah yeah yeah :P
May 1, 2004, 7:02 AM
Adron
[quote author=Yoni link=board=22;threadid=6566;start=0#msg57789 date=1083360722]
[quote author=Myndfyre link=board=22;threadid=6566;start=0#msg57762 date=1083346380]
[code]
int i = 3;
if i <<= 2 == 81 i -= 3;
[/code]
[/quote]
Hmm, the () could be given up by requiring { } to always appear in the if body. So you have to make some kind of compromise... It's better the way it is now anyway.
[/quote]

Actually, this code still doesn't look ambiguous. "81 i" isn't a valid expression, so it has to be where the conditionally executed statement starts. And of course you'd still have to use proper formatting of your code. You can write easy to read code today or you can write hard to read code.

[code]
int i = 3;
if i <<= 2 == 81
i -= 3;
[/code]

May 1, 2004, 10:29 AM
peofeoknight
[quote author=Myndfyre link=board=22;threadid=4629;start=15#msg57624 date=1083275925]
You know, I recently created a website where I set the DTD to XHTML 1.0 strict. I don't know if ASP.NET is honoring that, but it's just a side-note.
[/quote]
probably not. Atleast if you are doing a <form runat="server"> That will spit up the viewstate tag even if viewstate is off, which will cause your code not to be valid. Furhtermore the form will have aname attribute, and all asp.net elements will have a name attribute.
May 1, 2004, 3:12 PM
Myndfyr
What do you mean it will split up the viewstate tag? When you view it in Notepad, the widest a string can be is 1024 characters. It's still on the same line, *in reality* in the parser, just not in Notepad.
May 1, 2004, 6:01 PM
peofeoknight
I mean when you turn viewstate off in the web.config or at the top of the page, the tag will still be there, it will just only have a few characters there simply because a form is running at the server. It does not matter if its on one line or a bajillion, I know its in one line because I do not have mozilla set to wrap lines when I view the source, but the viewstate tag is will make the code invalid because it has the name attribute (name="__VIEWSTATE" ). Plus a form running that the server will have an invalid name attribute, just having the name there is bad, but the fact that the id, unless you change it has two __ in it too will also cause an error in the validator.
May 2, 2004, 5:22 AM
Yoni
if i * i == 5

Took me a minute to think of that one. Can be extended to make sense, but it's already ambiguous as it is.
May 2, 2004, 10:32 AM
Adron
Ah, good one, it needs that separator for operators that can be either unary or binary.
May 2, 2004, 3:14 PM

Search