I know that inline styles via the ‘style’ attribute take precedence over those specified in an external css file. But what about stand-alone attributes like ‘cellpadding’? An example line would be like this:
<table cellpadding="4" class="list">
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
6.4.4 Precedence of non-CSS presentational hints in the CSS 2.1 spec says: “The UA may choose to honor presentational attributes in an HTML source document. If so, these attributes are translated to the corresponding CSS rules with specificity equal to 0, and are treated as if they were inserted at the start of the author style sheet. They may therefore be overridden by subsequent style sheet rules.”
So any relevant setting in any author style sheet being applied overrides the effect of
cellspacing. The attribute sets the padding (in each direction) for each cell of the table to the specified value in pixels. So if you set e.g. for a particular cellpadding-right: 0, it will have that right padding and 4px padding in other directions.