Я редактирую файл HTML в Dreamweaver CS4, веб-сайт выглядит хорошим, если я выполняю его в Firefox, но я получаю эту ошибку: "недопустимая разметка, отмеченная недопустимый, потому что это содержит дублирующийся атрибут"
Вот код: выделенный является тем, показываемым в 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
Дублирующаяся спецификация атрибута "ВЫРАВНИВАЕТСЯ"
<td align="center" align="134" class="footer" valign="bottom">
ОБНОВЛЕНИЕ: Я использовал сетевой инструмент из http://validator.w3.org/check
Как другие сказали, строка кода, которую Вы выделили:
<td align="center" align="134" class="footer" valign="bottom">
имеет align
набор атрибута дважды. Второе (134
) не допустимое значение для align
.
Вне этого, тем не менее, Вы на самом деле получили много других проблем:
<forwardtoafriend>
, <unsubscribe>
, <subscribe>
, и <webversion>
— но ни один из них не часть никакого стандарта HTML и поэтому не понят под браузерами.<body>
тег.<meta>
или <img>
теги.background-repeat: repeat-y no-repeat;
правило стиля для body
недопустимо; это должно только иметь единственное значение (в этом случае, background-repeat: repeat-y
).<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center">сопровождаемый другой внутренней таблицей. Это прекрасно, но затем при закрытии внутренней таблицы у Вас есть другой
<tr>
когда необходимо закончить предыдущее <td>
и <tr>
сначала. И после той последней строки, у Вас есть закрытие </td>
это не соответствует никому предыдущему <td>
.</table> </body> </html>
doctype
<table>
не имеет атрибута высоты<img>
теги отсутствуют alt
атрибутыВы говорите использование Dreamweaver CS4 но я никогда не видел, что он производит такой вывод прежде …
Самый легкий способ узнать что случилось с Вашим HTML-кодом для проверки его здесь http://validator.w3.org.