---
title: "xhtml validering"
type: "forum-thread"
url: "https://www.webforum.nu/amne/html-css/171112-xhtml-validering"
topic: "HTML & CSS"
topic_url: "https://www.webforum.nu/amne/html-css"
author: "Jeppeweb"
published: "2008-04-27T17:28:49.000Z"
updated: "2008-04-27T17:36:19.000Z"
replies: 2
views: 390
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/html-css/171112-xhtml-validering"
---

# xhtml validering

## #1 — Jeppeweb, 2008-04-27T17:28Z

```
     <form id="startsearch" method="get" action="">
     <input type="text" value="Sök..." onclick="if(this.value == 'Sök...'){ this.value=''; }"/>
     </form>
```

Varför validerar inte den koden?

```
Line 95, Column 94: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
…alue == 'Sök...'){ this.value=''; }"/>&#9993; 
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>").
```

Permalänk: https://www.webforum.nu/p/171112

## #2 — Fia, 2008-04-27T17:35Z

Den vill nog ha \<fieldset\>-taggar mellan \<form\>-taggarna och \<input\>-taggarna.

Permalänk: https://www.webforum.nu/p/2103521

## #3 — Jeppeweb, 2008-04-27T17:36Z

Tack!

Permalänk: https://www.webforum.nu/p/2103522

---

Tråden på webben: https://www.webforum.nu/amne/html-css/171112-xhtml-validering
