Autor Zpráva
daaan
Profil *
Zdravím zkouším zvalidovat script :
<link rel="stylesheet" type="text/css" href="resource/sample2.css" media="screen,tv" title="default" alt"script"/>
<link rel="stylesheet" type="text/css" href="resource/lightbox.css" media="screen,tv" alt"script"/>
<script type="text/javascript" charset="UTF-8" src="resource/spica.js" alt"script"/></script>
<script type="text/javascript" charset="UTF-8" src="resource/lightbox_plus.js" alt"script"/></script>
ale bohužel nedaří se mi to.
Vím že script musím dát do externího souboru, ale nevím jak, když to hodím do stránky tak to není validní.
djlj
Profil
Co má být to alt"script"?
Vladosik
Profil
Script nezvalidujes...

(kdyztak me opravte:-) )
Petr Tichý
Profil
Není to skript a píšeš tam blbosti.
Zkus to takto:

<link rel="stylesheet" type="text/css" href="resource/sample2.css" media="screen,tv" />
<link rel="stylesheet" type="text/css" href="resource/lightbox.css" media="screen,tv" />
<script type="text/javascript" src="resource/spica.js" /></script>
<script type="text/javascript" src="resource/lightbox_plus.js" /></script>

To spíš ani nefungovale než aby to bylo jen nevalidní.
daaan
Profil *
tak takhle:
<link rel="stylesheet" type="text/css" href="resource/sample2.css" media="screen,tv" title="default" alt="script"/>
<link rel="stylesheet" type="text/css" href="resource/lightbox.css" media="screen,tv" alt="script"/>
<script type="text/javascript" charset="UTF-8" src="resource/spica.js" alt="script"/></script>
<script type="text/javascript" charset="UTF-8" src="resource/lightbox_plus.js" alt="script"/></script>
daaan
Profil *
to Petr Tichý
nejde to. Neni to valdiní.
djlj
Profil
píšeš tam blbosti
Proč by měl být charset blbost? :)
Vladosik
Profil
daaan
Tak sem dej odkaz ne?
daaan
Profil *
Validuji offline přes Operu.
daaan
Profil *
Z dočasných souborů na disku.
daaan
Profil *
jenal jsempodle toho návodu http://tvorba-webu.zdarek.com/html/xhtml.php
jonge
Profil
daaan
Co to píše za chybu?
daaan
Profil *
Line 51 column 86: document type does not allow element "link" here.

...urce/sample2.css" media="screen,tv" />

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



Line 52 column 87: document type does not allow element "link" here.

...rce/lightbox.css" media="screen,tv" />



Line 53 column 65: end tag for element "script" which is not open.

..."text/javascript" src="resource/spica.js" /></script>



Line 54 column 73: end tag for element "script" which is not open.

..." src="resource/lightbox_plus.js" /></script>
Vladosik
Profil
daaan
Chyba je v nejake spatne syntaxi v celem dokumentu, nikoliv v tom zapisu skriptu. Alespon podle mych zkusenosti...
jonge
Profil
daaan
Ještě nám sem hoď kód té stránky a bude to jasné.
daaan
Profil *
Dobrý už to mám , problém byl že to mělo být zapsáno v hlavičce.
Kod.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">


<head>
<meta http-equiv="Content-Language" content="cz" />
<title>www.letysmety.com - Úvodní stránka</title>
<meta http-equiv="Content-Type" content="text/html; windows-1250" />
<meta name="description" content="Potápění Jana Letalika a Tomáše Smetky"/>
<link rel="stylesheet" type="text/css" href="styl/muj_styl.css" />
<link rel="shortcut icon" href="../favicon.ico"/>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="mi" />
<meta name="X-Resource-Dir" content="resource/" />
<meta name="X-Script-Dir" content="resource/" />
<link rel="stylesheet" type="text/css" href="resource/sample.css" media="screen,tv" title="default" />
<link rel="stylesheet" type="text/css" href="resource/lightbox.css" media="screen,tv" />
<script type="text/javascript" charset="UTF-8" src="resource/spica.js"></script>
<script type="text/javascript" charset="UTF-8" src="resource/lightbox_plus.js"></script>
</head>

<body>


<center>
<div id="connect">
<div id="hlavicka" align="left">
<a href="#">Vítejte</a></div>

<div id="menu">
<ul>
<li><a href="index.htm">Aktuality</a></li>
<li><a href="fotogalerie.htm">Fotogalerie</a></li>
<li><a href="videogalerie.htm">Videogalerie</a></li>
<li><a href="autori.htm">Autoři webu</a> </li>
<li><a href="odkazy.htm">Odkazy</a></li>
<li><a href="forum.htm">Diskuze</a></li>
</ul></div>

<div id="obsah" align="left">



<h1>»Egypt«</h1>

<div id="fotky_popis" align="left">
<img src="images/vlajky/egypt.gif" border="1" height="20" width="30" alt=""/><br/>
Foceno fotoaparátem <b>Olympus µ600 s extrením bleskem</b><br/>
Vidielnost <b>20-25m</b><br/>
Teplota vody <b>25°C-28°C</b><br/><br/>
</div>

<p>
</p>

</div>
<div id="paticka">&copy; Copyright all rights reserved LetySmety.com.| Designed By <a href="http://smety.letysmety.com"> Tomáš Smetka.</a> </div>
</div>
</center>
</body>

</html>
Už je 100% Valdiní.
Petr Tichý
Profil
djlj
Nevím jestli u tagu skript existuje. A jestli ano, tak jsem ho prostě oddělal i s tím alt, co tam nemělo co dělat. Nikdy jsem charset nepoužil, leda kdyby byl skript v jiném kódování než dokument, nevím neznám.
Toto téma je uzamčeno. Odpověď nelze zaslat.

0