![]() |
![]() |
|
|
|||||||
| Programmierung Rat & Tat für Programmierer |
![]() |
|
|
Themen-Optionen | Ansicht |
|
|
|
|
#1 |
|
Veteran
![]() Registriert seit: 30.09.2000
Beiträge: 267
|
Einspruch, euer Ehren!
weiter unten in Text: Note. User agents should be able to find anchors created by empty A elements, but some fail to do so. For example, some user agents may not find the "empty-anchor" in the following HTML fragment: <A name="empty-anchor"></A> ...some HTML... Link to empty anchor Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="CONTENT-TYPE" content="text/html; charset=iso-8859-1"> <title>Test</title> </head> <body> <A name="empty-anchor"></A> Link to empty anchor </body> </html> Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="CONTENT-TYPE" content="text/html; charset=iso-8859-1"> <title>Test</title> </head> <body> <A name="empty-anchor"></A> Link to empty anchor </body> </html> Es liegt offensichtlich am verwendeten Doctype. Des Rätsels Lösung steht auch in SelfHTML (für "Strict"): "So ist es in dieser Variante beispielsweise nicht erlaubt, zwischen <body> und </body> einfach nur Text zu notieren. Alle Inhalte müssen in so genannten Block-Elementen stehen, z.B. in Überschriften, Textabsätzen, Tabellen usw." Es liegt also gar nicht am fehlenden A-Inhalt, sondern am fehlenden Block-Element. Wieder was gelernt! Grüße Roland |
|
|
|
![]() |
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|