|
|
|
Joined: Aug 2000
Posts: 335
Member
|
Member
Joined: Aug 2000
Posts: 335 |
Is the following considered to be valid HTML? 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.
|
|
|
|
Joined: May 2000
Posts: 1,168
Member
|
Member
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
Joined: Aug 2000
Posts: 335 |
invalid under HTML 4.01Does 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. 
|
|
|
|
Joined: Aug 2000
Posts: 335
Member
|
Member
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.  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
Joined: Aug 2000
Posts: 335 |
|
|
|
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.
|
|
Posts: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|
|
|