Results 1 to 2 of 2

Custom attributes: heroic or heinous?

This is a discussion on Custom attributes: heroic or heinous? within the Programming forums, part of the Web Designing & Development category; ...

  1. #1
    Senior Member chinmay.sahoo's Avatar
    Join Date
    Dec 2013

    Thumbs up Custom attributes: heroic or heinous?

    The use of custom attributes to adorn DOM elements with attributes not defined by the HTML or XHTML Specifications is a practice that has both its supporters and detractors. To some, itís a useful leveraging of the tools that HTML and the browsers make available to us; to others, itís an affront to all that is good because using custom attributes can prevent the page from passing validation testing.

    Your authors take no sides on this issue and leave it to you, the reader, to determine whether you think that using custom attributes is a useful mechanism or a wart on the face of a page. Without the use of the attribute, the price data could be stored in a JavaScript variable containing an object hash that associates an appetizer name (imperial, for example) with its price. The custom attribute tactic can be said to be advantageous over the JavaScript
    variable mechanism because adding new appetizer entries means adding a new,self-contained construct to the page without having to remember to update the object hash with the price of added appetizers.Again, we leave it to you to determine which approach you feel suits you best.

  2. #2
    Senior Member charlottegracie's Avatar
    Join Date
    Jan 2017

    Default Re: Custom attributes: heroic or heinous?

    Thank you for your post you have done a grate job