Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm editing an HTML file in Dreamweaver CS4, the website looks good if I run it in firefox but I'm getting this error: "invalid markup marked invalid because it contains a duplicate attribute"

Here is the code: the highlighted one is the one being shown in Dreamweaver.

<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Template 3 - Left Sidebar</title>
<style type="text/css" media="screen">
  body {
     margin: 20px 0 0 0;
    padding: 0;
    background-image: url('bg.jpg');
    background-repeat: repeat-y no-repeat;
    background-color: #8da2b2;
    background-position: top center;
  }

  p {
    font-family: Tahoma;
    font-size: 12px;
    color: #333333;
  }

  li {
    margin: 0;
    padding: 0;
  }

  td.permission {
     padding: 10px 0 10px 0;
  }

  td.permission p {
    font-family: Arial;
    font-size: 11px;
    color: #4c4c4c;
    margin: 0 0 4px 0;
    padding: 0;
    text-align: center;
  }

  td.permission p.second {
    margin-bottom: 8px;
  }

  td.permission a {
    color: #000000;
  }

  td.header {
    background-color: #b73224;
    height: 110px;
  }

  td.header h1 {
    font-family: Impact, 'Arial Black';
    font-size: 33px;
    color: #eaedc9;
    font-weight: normal;
    line-height: 28px;
    display: inline;
    margin: 0 0 0 20px;
    padding: 0;
  }

  td.sidebar a img {
    border: none;
  }

  .table {
    background-color: #a52c21;
  }

  td.miniTable {
    background-color: #a52c21;
    padding: 20px;
  }

  td.miniTable h2 {
    font-family: Arial;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
  }

  td.miniTable h3 {
     font-family: Tahoma;
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    margin: 0;
    padding: 0;
  }

  td.miniTable h3 a {
    font-family: Tahoma;
    font-size: 14px;
    font-weight: normal;
    color: #ffffff;
    text-decoration: underline;
  }

  td.miniTable p {
    font-family: Tahoma;
    font-size: 12px;
    font-weight: normal;
    color: #e7fccf;
    margin: 0 0 10px 0;
    padding: 0;
  }

  td.miniTable ul {
    font-family: Tahoma;
    font-size: 14px;
    font-weight: normal;
    color: #e7fccf;
    margin: 0 0 0 24px;
    padding: 0;
  }

  td.miniTable ul li a {
    font-family: Tahoma;
    font-size: 14px;
    font-weight: normal;
    color: #e7fccf;
     text-decoration: none;
  }

  td.mainbar h2 {
    font-family: Arial;
    font-size: 18px;
    color: #000000;
    border-left: 10px solid #a02f27;
    padding-left: 8px;
  }

  td.mainbar h2 a {
    font-family: Arial;
    font-size: 18px;
    color: #000000;
    text-decoration: none;
  }

  td.mainbar a {
    color: #344692;
  }

  td.mainbar p {
    margin: 0 0 20px 0;
  }

  td.mainbar p.top {
    margin: 0 0 5px 0;
    padding: 0;
    width: 100%;
    text-align: right;
  }

  td.mainbar p.top a {
    font-size: 11px;
    margin: 0 4px 0 0;
  }

  td.mainbar img.inline {
    margin: 0 0 10px 0;
  }

  td.footer {
    height: 134px;
  }

  td.footer p {
    font-family: Arial;
    font-size: 11px;
    font-weight: normal;
    color: #333333;
    margin: 0 0 20px 0;
    text-align: center;
  }

  table.tab {
    background-image: url('footer-bg.gif');
    background-rep
share|improve this question

3 Answers 3

up vote 4 down vote accepted

Duplicate specification of attribute "ALIGN"

<td align="center" align="134" class="footer" valign="bottom">

UPDATE: I used the online tool from http://validator.w3.org/check

share|improve this answer
    
thanks for the info Nicu Zecheru. Do I have to copy all the HTML code? and paste it on the address tab of the validator website? this is very helpful. –  tintincutes Aug 3 '10 at 20:46
1  
you have 3 options: Validate by URI (validator.w3.org/#validate_by_uri), file upload (validator.w3.org/#validate_by_upload) or direct input (validator.w3.org/#validate_by_input): –  Nicu Zecheru Aug 3 '10 at 20:52
    
i found it thanks for the help;-) –  tintincutes Aug 3 '10 at 20:53

As others have said, the line of code you highlighted:

<td align="center" align="134" class="footer" valign="bottom">

has the align attribute set twice. The second (134) isn't a valid value for align.

Outside that, though, you've actually got a number of other problems:

  • you're using the tags <forwardtoafriend>, <unsubscribe>, <subscribe>, and <webversion>—but none of them are part of any HTML standard, and therefore aren't understood by browsers.
  • You have no opening <body> tag.
  • You aren't closing your <meta> or <img> tags.
  • Your background-repeat: repeat-y no-repeat; style rule for body is invalid; it should only have a single value (in this case, background-repeat: repeat-y).
  • You start off with
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
             <td align="center">
    followed by another internal table. That's fine, but then when you close the internal table, you have another <tr> when you need to end your previous <td> and <tr> first. And after that last row, you have a closing </td> that doesn't match any previous <td>.
  • At the end, you're missing the tags:
            </table>
        </body>
    </html>
  • Some other quibbles:
    • you should have a doctype
    • <table> doesn't have a height attribute
    • some of your <img> tags are missing alt attributes

You say you're using Dreamweaver CS4, but I've never seen it produce that kind of output before…

share|improve this answer
    
hi Dori thanks for the input, i got this html from the website, its a template. I would like to design a newsletter and don't know where to start. so i decided to download some samples newsletter and would like to give it a try with dreamweaver or more or less edit it from there. i don't have a strong background with css & php though but i am a quick learner once i know the functions. –  tintincutes Aug 3 '10 at 22:07

The easiest way to find out whats wrong with your html code to validate it here http://validator.w3.org.

share|improve this answer
    
thanks too. I just played around and found out that the align="134" is the problem. When I deleted it, it solved the problem. But how can I validate it in the validator site? Do I have to copy all the html code? –  tintincutes Aug 3 '10 at 20:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.