PDA

View Full Version : element not allowed in context. last error!


957
04-03-2010, 11:19 AM
I can't find a solution for this one.


1. Error Line 44, Column 70: document type does not allow element "form" here; missing one of "object", "applet", "map", "iframe", "ins", "del" start-tag

<caption><form method="get" action="http://www.google.com/search">



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


Here's my coding for that section.


<caption><form method="get" action="http://www.google.com/search">

<input type="text" name="q" size="40"
maxlength="255" value="" />
<input type="submit" value="Google search" />
</form></caption>


Any help is very much appreciated

Dormilich
04-03-2010, 12:41 PM
it’s as described, <caption> can only contain inline elements. besides, why would you put a form in a caption?

957
04-03-2010, 12:48 PM
I'm still relatively new to this. I'm just manipulating code to get what I want. Just like in real life!

Dormilich
04-03-2010, 12:50 PM
that’s a rather bumpy road. read some tutorials first and the way is getting much smoother.

957
04-03-2010, 12:50 PM
I'm using it to center the search bar

Dormilich
04-03-2010, 12:51 PM
OMG.

use CSS.

957
04-03-2010, 12:55 PM
how can I center it otherwise?

957
04-03-2010, 12:56 PM
OMG.

use CSS.

my question is how, though. I'm probably not as good at this as you

Dormilich
04-03-2010, 12:59 PM
use text-align: center; on the parental block-element.

957
04-03-2010, 01:11 PM
tried it but didn't work. not sure if this is right but I just read that it's deprecated if inside of a table tag. that might be only html. but since it didn't work I'm going to assume it's also with css too.

Dormilich
04-03-2010, 01:26 PM
I think you’ve got the wrong idea there.

to be more helpful, I need to look at your code.

957
04-03-2010, 01:36 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<!--META TAGS-->
<meta http-equiv="content-type" content="text/html/javascript;charset=utf-8" />
<meta name="description" content="Bookmarks are convenient again" />
<meta name="keywords" content="Bookmark, Bookmarks, Bookmarking, Favorite, Favorites, Bokkmark, Bokkmarks, Bokkmarking, NineFiveSeven, NinFiveSeven, 957, 947," />
<meta name="author" content="Matthew Chatterton, 957" />
<meta name="google-site-verification" content="cgXAnSRuoISyTbxJZvCVHlSdyQO1t6-0ENPaaHzlmj0" />
<!--STOP META TAGS-->

<!--EXTERNAL FILES-->
<link rel="stylesheet" type="text/css" href="main.css" />
<script type="text/javascript" src="main.js"></script>
<!--STOP EXTERNAL FILES-->

<title>957 Bookmarks</title>

<!--CSS INTERNAL-->
<style type="text/css">.center { text-align:center; } table {width: 100%;} form { text-align:center; } </style>
<!--STOP CSS INTERNAL-->

<!--JAVASCRIPT INTERNAL-->
<script type="text/javascript">
function show_alert()
{
alert("What did I just tell you?!");
}
</script>
<!--JAVASCRIPT INTERNAL-->

</head>

<body onload="startTime()">

<a href="info.html"><img style="position: absolute; top: 0px; left: 0px; z-index=-1" src="http://ninefiveseven.99k.org/957logo.gif" alt="957logo" /></a>

<h4 class="center">Favorites</h4>
<br /><br /><br />

<table>

<form style="text-align:center" method="get" action="http://www.google.com/search">
<input type="text" name="q" size="33"
maxlength="255" value="" />
<input type="submit" value="Google search" />
</form></td>

<tr>
<td>
<b>eMail</b>
<br />
<div>
<a href="http://www.mail.com">Mail.com</a>
<br />
<a href="http://www.yahoo.com/mail">Yahoo mail</a>
<br />
<a href="http://www.hotmail.com">Hotmail</a>
<br />
<a href="http://mail.google.com">Gmail</a>
</div></td>

<td>
<b>File Sharing</b>
<br />
<div>
<a href="http://www.flickr.com">Flickr</a>
<br />
<a href="http://imageshack.us">ImageShack</a>
<br />
<a href="http://photobucket.com">PhotoBucket</a>
<br />
<a href="http://www.rapidshare.com/">RapidShare</a>
<br />
</div></td>

<td>
<b>Jobs</b>
<br />
<div>
<a href="http://www.craigslist.org">Craigslist</a>
<br />
<a href="http://www.jobcorps.gov/home.aspx">JobCorp</a>
<br />
</div></td>

<td>
<b>Linguistics</b>
<br />
<div>
<a href="http://www.dictionary.com">Dictionary</a>
<br />
<a href="http://www.rhymezone.com">RhymeZone</a>
<br />
<a href="http://www.anagramsite.com">Anagrams</a>
<br />
<a href="http://www.spanishdict.com/">SpanishDict</a>
</div></td>

<td>
<b>Maps</b>
<br />
<div>
<a href="http://www.mapquest.com">MapQuest</a>
<br />
<a href="http://maps.google.com">Google Maps</a>
</div></td>

<td>
<b>Music</b>
<br />
<div>
<a href="http://www.playlist.com">Playlist</a>
<br />
<a href="http://www.azlyrics.com">Lyrics</a>
<br />
<a href="http://www.hamienet.com">Hamienet</a>
<br />
<a href="http://www.music-sites.net">Music-Sites</a>
<br />
</div></td>

<td>
<b>News</b>
<br />
<div>
<b>general</b>
<br />
<a href="http://www.cnn.com">CNN</a>
<br />
<a href="http://www.cbsnews.com/">CBSnews</a>
<br />
<a href="http://www.msnbc.msn.com/">MSNBC</a>
<br />
<a href="http://www.bbc.co.uk">BBC</a>
<br />
<a href="http://www.npr.org">NPR</a>
<br />
<b>financial</b>
<a href="http://www.businessweek.com/">Businessweek</a>
<br />
<a href="http://www.nasdaq.com/">NASDAQ</a>
<br />
<a href="http://www.nyse.com/">NYSE</a>
<br />
<b>political</b>
<a href="http://www.c-span.org">C-Span</a>
<br />
<b>miscellaneous</b>
<a href="http://www.ewrestlingnews.com">eWrestling news</a>
<br />
<a href="http://en-us.nielsen.com/">Nielson</a>
<br />
</div></td>
</tr>

<tr>
<td>
<b>Science</b>
<br />
<div>
<a href="http://www.sciencedaily.com/">ScienceDaily</a>
<br />
<a href="http://www.nasa.gov">NASA</a>
<br />
<a href="http://www.scirus.com">Scirus</a>
<br />
</div></td>

<td>
<b>Shopping</b>
<br />
<div>
<a href="http://www.amazon.com">Amazon</a>
<br />
<a href="http://www.ebay.com">eBay</a>
<br />
<a href="https://www.paypal.com">PayPal</a>
<br />
</div></td>

<td>
<b>Social Sites</b>
<br />
<div>
<a href="http://www.myspace.com">MySpace</a>
<br />
<a href="http://www.facebook.com">Facebook</a>
<br />
<a href="http://www.Twitter.com">Twitter</a>
<br />
<a href="https://www.blogger.com">Blogger</a>
<br />
<a href="http://www.orkut.com">Orkut</a>
<br />
<a href="http://www.hi5.com">hi5</a>
<br />
<a href="http://www.friendster.com">Friendster</a>
<br />
<a href="http://www.skyrock.com">Skyrock</a>
</div></td>

<td>
<b>Sports</b>
<br />
<div>
<a href="http://espn.go.com/">ESPN</a>
<br />
<a href="http://www.nfl.com">NFL</a>
<br />
<a href="http://www.nba.com">NBA</a>
<br />
<a href="http://www.nhl.com">NHL</a>
<br />
<a href="http://www.mlb.com">MLB</a>
<br />
<a href="http://www.mlsnet.com">MLS</a>
<br />
</div></td>

<td>
<b>TV/Movies/Video</b>
<br />
<div>
<a href="http://www.hulu.com">Hulu</a>
<br />
<a href="http://www.youtube.com">Youtube</a>
<br />
<a href="http://www.youtube.com/movies">Youtube Movies</a>
<br />
<a href="http://www.dailymotion.com">Dailymotion</a>
<br />
<a href="http://www.imdb.com">IMDb</a>
<br />
</div></td>

<td>
<b>Misc.</b>
<br />
<div>
<a href="http://www.accuweather.com">Weather</a>
<br />
<a href="http://www.timeanddate.com/worldclock">TimeZones</a>
<br />
<a href="http://www.wikipedia.com">Wikipedia</a>
<br />
<a href="http://www.yellowpages.com">YellowPages</a>
<br />
<a href="http://wordpress.com">WordPress</a>
<br />
<a href="http://citysearch.com">CitySearch</a>
</div></td></tr></table>

<br /><br /><br /><br /><br />

<center><a class="center" href="mailto:957@mail.com">feedback and suggestions.</a></center>

<img style="position: absolute; bottom: 0; right: 0;" src="http://www.e-zeeinternet.com/count.php?page=396298&amp;
style=LED&amp;nbdigits=9&amp;reloads=1" align="right" alt="Hit Counter" border="0" />

<b><big><a style="position: absolute; top: 0; right: 0;" id="time"></a></big></b>

<input style="position: absolute; bottom: 0; left: 0;" type="button" onclick="show_alert()" value="Don't click here!" />

</body>
</html>

Dormilich
04-03-2010, 01:50 PM
some things to mention:
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
remove the <br/>, it’s easier with
a {
display: block;
}
remove the table, it’s easier with
div {
float: left;
}
replace <b> by <h2>
<center> is deprecated

957
04-03-2010, 02:02 PM
thank you!

957
04-03-2010, 02:23 PM
YAY! I'M ERROR FREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE EEEEEEEEEEEEEEEEEEEEEEEEEEE!

oh wait... now I have to do my other page