Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: walidacja W3C
Forum PHP.pl > Forum > Przedszkole
ukaszq
Mam problem z walidacją W3C. Wyskakuje mi jeden błąd:

1. Error Line 12, Column 57: document type does not allow element "link" here.

<link rel="stylesheet" type="text/css" href="style.css" />



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

Nie wiem co mam zrobic?
Oto kod w ktorym jest to umieszczone, naglowek:

<!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" xml:lang="pl" lang="pl">
<head>
<meta name="keywords" content="kluczoweslowa" />
<meta name="Description" content="Server" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tytul</title>
</head>
<link rel="stylesheet" type="text/css" href="style.css" />
<body>
mike
Pewnie masz link od razu w <body>. Nie każdy element można umieścić w każdym miejscu.
kyno
Element <link> powinien być w sekcji <head>. Zresztą wszystko masz opisane....
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.