webForumDet fria alternativet

Konstigt fel i Validator

7 svar · 239 visningar · startad av joel_joel88

joel_joel88Medlem sedan nov. 20021 222 inlägg
#1

Hej!

När jag kör en sida genom w3 validator så får jag detta fel....

Line 18, column 17: document type does not allow element "P" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

<p align="center"><b>Huvudlista till Introduktionsmöte för flygintresserade</b

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>").

eller kolla själv

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.segelflygetkarlstad.se%2Fanmalda.asp&charset=(detect+automatically)&doctype=(detect+automatically)&ss=1&outline=1&sp=1

Vad är felet? <p> stöd väl i 4.01?

BrantisMedlem sedan dec. 20011 978 inlägg
#2

Titta vad det står på den sista raden.

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>").

Din kod:

<font style="font-family:Verdana;font-size:16px;color:#336699;">
<p align="center"><b>Huvudlista till Introduktionsmöte för flygintresserade</b></p>
</font>
joel_joel88Medlem sedan nov. 20021 222 inlägg
#3

Så<font>och <b> taggen ska vara utan för <p>

Eller är jag trög?

joel_joel88Medlem sedan nov. 20021 222 inlägg
#4

skrev fel, jag menar ska <font> vara inuti <p>?

silfverMedlem sedan apr. 200312 679 inlägg
#5

Tvärt om. Innanför. :) Du kan inte sätta en font-tagg utanför en p-tagg. :)

joel_joel88Medlem sedan nov. 20021 222 inlägg
#6

Bra, tack nu fungerar det!

zcorpanMedlem sedan dec. 20042 245 inlägg
#7

Jag skulle ersätta den kodsnutten med

<h1>Huvudlista till Introduktionsmöte för flygintresserade</h1>

och i stilmallen:

h1 {
 font-family:Verdana, sans-serif; 
 font-size:120%; /* eller vad som ser bra ut */
 color:#369;
 text-align:center;
}
OlleBoopMedlem sedan feb. 20001 861 inlägg
#8

/edit: Pucktvåa...

134 ms totalt · 3 externa anrop · v20260731065814-full.fb544a5a
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
131 ms — hämta tråd, inlägg och bilagor (db)