Guten Abend erstmal
, ich weiß der Titel ist nicht sehr aussagekräftig aber ich weiß nicht wie ich es sonst nennen soll, habe folgendes Problem:
Ich habe in einem div-Container einen Titel und ein Datum, der Titel soll FETT sein und das Datum kleiner und kursiv,ich möchte das beides aber nicht in 2 verschiedenene Div-Container aufteilen.
Also habe ich im CSS folgendes definiert:
Für den Titel:
[code]u2 {
font-weight:bold;
}[/code]
Für das Datum:
u1 {
font-size: small;
font-style: italic;
color: #666;
}
Der Inhalt des div-Containers wird mit einem PHP-Script aus der Datenbank geladen und ergibt folgendes Ergebnis:
Es funktioniert auch alles wunderbar ! Aber wenn ich jetzt überprüfen lasse ob der HTML-Code valide ist, kommt folgende fehlermeldung:
[quote]Line 348, Column 137: element “u2” undefined
…=‘0’ />
You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
[/quote]
und das gleiche nochmal für u2, gibt es da eine Lösung für ? Und wieso tritt das überhaupt auf, ich bin da ein wenig ratlos.
Danke schonmal.
Edit: Ich merke grade, dass das Thema viel besser in “HTML, XML, CSS und Javascript” gepasst hätte,sry, wäre nett wenn es jemand verschiebt
.

