Previous Thread
Next Thread
Print Thread
Rate Thread
#108310 05/23/2001 6:32 PM
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
Is the following considered to be valid HTML?

Code
code:

I know that there's no reason to intentionally have more than one instance of an attribute, I'm just trying to find out whether or not it would cause problems with any browsers.

Sponsored Links
Joined: May 2000
Posts: 1,168
Member
Member
Offline
Joined: May 2000
Posts: 1,168
I don't believe that it will cause any problems because, by default, only the first occurance of any attribute within an html tag will be recognized. However, just because this "works" doesn't make it valid.

- DB

Joined: Sep 2000
Posts: 4,211
Master Hacker
Master Hacker
Joined: Sep 2000
Posts: 4,211
sorry, but that code would be invalid under HTML 4.01.

Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
invalid under HTML 4.01

Does the 4.01 specification state exactly how a browser shall interpret the above tag? I looked around at www.w3.org, but couldn't find that info.

I don't care if the browser just ignores the tag, but I don't want to use the tag if it's going to result in erratic behavior.

Joined: Sep 2000
Posts: 4,211
Master Hacker
Master Hacker
Joined: Sep 2000
Posts: 4,211
i'm not exactly sure how it would get rendered, but different browsers will treat it differently. i can tell you that the page that you're trying to use that on wouldn't pass for validation. like DB said, most browsers will probably only look at the first instance of it.

just don't hold me to that. smile

Sponsored Links
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
Thanks.

What I'm doing is implementing a UBB code extension to emulate the HTML font tag. I'd prefer not to bother checking for duplicated attributes. I suppose it's no worse than if HTML is enabled, and someone uses invalid HTML.

Joined: Sep 2000
Posts: 4,211
Master Hacker
Master Hacker
Joined: Sep 2000
Posts: 4,211
oh, really? sounds like something cool. smile the only advice that i can offer you is that the code is only as good as the coder...

Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)