So I have having a weird situation here.
I have an ASP file that outputs a simple table element. <table>
in the file mark up.
However when it renders, it is generating <table cellpadding="0" cellspacing="0">
on the final mark up.
I would like to remove cellpadding and cellspacing due to it being an invalid HTML5. I am getting errors when using the HTML5 validator.
Can anyone point me to the right direction in how to remove them?
I have tried using jquery to removeAttr('cellpadding')
, in html console, it has removed the attribute, however in the mark up it is still there so HTML5 validator is still showing errors.
Any help would be appreciated. Thanks
removeAttr('cellpadding')
" — That modifies the DOM, not the HTML, and won't be run by the validator anyway. – Quentin 20 hours ago<table>
in the source file but<table with stuff>
gets delivered to the browser, then you need to find whatever is changing it and stop it (and that will be between the source file and it coming out of the server) – Quentin 20 hours agowith stuff
(i.e. attributes) are rendered based on what is the the Controls (parent of WebControl) Attribute collection (which is a KeyNameValuePair or similar struture). You can modify this by extending the Table class, hooking its prerender event and modifying the Attribute collection – Paul Sullivan 20 hours ago