我正在编写一个网站,我遇到了一个问题。我很确定我已经正确地打开并关闭了一个表,但是我从Adobe Dreamweaver CC得到一个错误,说我没有。我得到的具体错误消息如下:
这是我的源代码(忽略纯文本,我正在编写一个挪威网站):
<!DOCTYPE html>
<html lang="nb">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bergen Eiendom</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="css/bootstrap.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#myInverseNavbar2" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<a class="navbar-brand" href="#">EFA Eiendom</a> </div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="myInverseNavbar2">
<ul class="nav navbar-nav navbar-right">
<li><a href="index.html">Hjem</a></li>
<li><a href="about.html">Om oss</a></li>
<li><a href="#">Bank</a></li>
<li><a href="#">ENG/NO</a></li>
<li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true">Adresser <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Adresse 1</a></li>
<li><a href="#">Adresse 2</a></li>
<li><a href="#">Adresse 3</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Noe annet?</a></li>
</ul>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 hidden-xs">
<div id="carousel-299058" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#carousel-299058" data-slide-to="0" class=""> </li>
<li data-target="#carousel-299058" data-slide-to="1" class="active"> </li>
<li data-target="#carousel-299058" data-slide-to="2" class=""> </li>
</ol>
<div class="carousel-inner">
<div class="item"> <img class="img-responsive" src="imagescomputer-networking-1920x500.jpg" alt="thumb">
<div class="carousel-caption"> Beskrivelse av bilde. Kanskje bilde av en av leilighetene? </div>
</div>
<div class="item active"> <img class="img-responsive" src="images/growth-homeslider-jumpstart-1920x500.jpg" alt="thumb">
<div class="carousel-caption"> Et annet bilde med beskrivelse. </div>
</div>
<div class="item"> <img class="img-responsive" src="images/last ned.jpg" alt="thumb">
<div class="carousel-caption"> Et tredje bilde med beskrivelse </div>
</div>
</div>
<a class="left carousel-control" href="#carousel-299058" data-slide="prev"><span class="icon-prev"></span></a> <a class="right carousel-control" href="#carousel-299058" data-slide="next"><span class="icon-next"></span></a></div>
</div>
</div>
<hr>
</div>
<section>
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6">
<div class="media-object-default">
<div class="media">
<div class="media-left"> <a href="#"> <img class="media-object img-circle" src="images/100X100.gif" alt="placeholder image"> </a> </div>
<div class="media-body">
<h4 class="media-heading">Adresse 1</h4>
Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6">
<div class="media">
<div class="media-left"> <a href="#"> <img class="media-object img-circle" src="images/100X100.gif" alt="placeholder image"></a></div>
<div class="media-body">
<h4 class="media-heading">Adresse 2</h4>
Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6">
<div class="media">
<div class="media-left"> <a href="#"> <img class="media-object img-circle" src="images/100X100.gif" alt="placeholder image"></a></div>
<div class="media-body">
<h4 class="media-heading">Adresse 3</h4>
Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.Dette er tekst.</div>
</div>
</div>
</div>
</div>
</section>
<hr>
<div class="containerapcontact">
<div class="aligntoright">
<div class="col-lg-3 col-md-6 col-md-offset-3 col-lg-offset-0">
<table>
<tr>
<div class="well">
<h3 class="text-center">Finn et bosted</h3>
<form class="form-horizontal">
<div class="form-group">
<label for="location1" class="control-label">Adresse</label>
<select class="form-control" name="" id="location1">
<option value="">Alle adresser</option>
<option value="">Adresse 1</option>
<option value="">Adresse 2</option>
<option value="">Adresse 3</option>
</select>
</div>
<div class="form-group">
<label for="type1" class="control-label">Type</label>
<select class="form-control" name="" id="type1">
<option value="">Hvilket som helst bosted</option>
<option value="">Liten leilighet</option>
<option value="">Stor leilighet</option>
<option value="">Kollektiv</option>
</select>
</div>
<div class="form-group">
<label for="pricefrom" class="control-label">Pris fra</label>
<div class="input-group">
<div class="input-group-addon" id="basic-addon1">kr</div>
<input type="text" class="form-control" id="pricefrom" aria-describedby="basic-addon1">
</div>
</div>
<div class="form-group">
<label for="priceto" class="control-label">Pris til</label>
<div class="input-group">
<div class="input-group-addon" id="basic-addon2">kr</div>
<input type="text" class="form-control" id="priceto" aria-describedby="basic-addon1">
</div>
</div>
<p class="text-center"><a href="#" class="btn btn-danger" role="button">Søk </a></p>
</form>
</div>
</tr>
</div>
<!--Code for embedded Google Map-->
<tr>
<script>
function initMap() {
var uluru = {lat: -25.363, lng: 131.044};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: uluru
});
var marker = new google.maps.Marker({
position: uluru,
map: map
});
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?&callback=initMap">
</script>
<!--End of code for embedded Google Map-->
</table>
<hr>
<h3 class="text-center">Kontaktpersoner</h3>
<div class="media-object-default">
<div class="media">
<div class="media-left"> <a href="#"> <img class="media-object img-rounded" src="images/64X64.gif" alt="placeholder image"> </a> </div>
<div class="media-body">
<h4 class="media-heading">Kontaktperson 1</h4>
<abbr title="Phone">tlf:</abbr> +47 123 456 78 <a href="mailto:#">kontakt1@hotmail.com</a> </div>
</div>
<div class="media">
<div class="media-left"> <a href="#"> <img class="media-object img-rounded" src="images/64X64.gif" alt="placeholder image"> </a> </div>
<div class="media-body">
<h4 class="media-heading">Kontaktperson 2</h4>
<abbr title="Phone">tlf:</abbr> +47 456 234 78 <a href="mailto:#">kontakt2@hotmail.com</a> </div>
</div>
</div>
</div>
</div>
</tr>
</div>
<hr>
<footer class="text-center">
<div class="container">
<div class="row">
<div class="col-xs-12">
<p>Copyright/Rights served deklarasjon</p>
</div>
</div>
</div>
</footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-1.11.3.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>
</body>
</html>
答案 0 :(得分:0)
您的<tr>
代码TR =表格行中没有任何实际列。
HTML表格结构如下:
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
<tr>
<td>Col 1: Row1</td>
<td>Col 2: Row1</td>
</tr>
<tr>
<td>Co1:Row2</td>
<td>Col2:Row2</td>
</tr>
</table>