how to extend HTML tags/attributes? [message #217885] |
Mon, 21 July 2008 11:50  |
Eclipse User |
|
|
|
Hi,
Is there a convenient way of extending HTML tags/attributes?
Writing something like:
<div myCustomTag="...">
is not accepted by HTML validator.
Is there a way to "improve" HTML validator?
Thanks!
|
|
|
|
|
|
|
|
|
|
Re: how to extend HTML tags/attributes? [message #218068 is a reply to message #218032] |
Wed, 23 July 2008 10:47  |
Eclipse User |
|
|
|
Originally posted by: nowhere.a.com
Philippe Marschall wrote :
> Wojtek wrote:
>> Nitin Dahyabhai wrote :
>>> Wojtek wrote:
>>>> For XHTML I agree, but HTML is looser and does "allow" it.
>>>
>>> The browsers may allow it, but that doesn't make it valid.
>>
>> Which is unfortunate as it can be useful. I use it inside a <span> to mark
>> text for special processing. Well, two custom attributes.
>>
>> The user selects some text in a JavaScript text editor (Xinha), then clicks
>> on a button. The button surrounds the selected text with a <span> which
>> contains a custom attribute.
>>
>> On the server side I parse for the span/attributes, then do the processing
>> on the text. I then save the original and the processed text into a DB.
>>
>> When showing the two texts, the text inside the <span> is in a different
>> CSS class. So the user can see the selected text plus what the processing
>> did.
>>
>> Um, somewhat terse, but I have an NDA...
>>
>> The alternative would be to subvert and mis-use some standard attributes.
>>
>
> Why can't you just use a semantic CSS class?
There is more there than just UI. The text between the <span> and
</span> is replaced.
--
Wojtek :-)
|
|
|
Powered by
FUDForum. Page generated in 0.33018 seconds