Ankündigung

Einklappen
Keine Ankündigung bisher.

Frage bezüglich HTML Validator

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Frage bezüglich HTML Validator

    Hi,
    ihr kennt ja den Validator von W3C.
    Nun habe ich meinen Code validieren lassen und bekomme 8 Fehler, von dennen ich nicht weiß, wo das Problem ist. Vllt. könnt ihr mir da ja weiter helfen.
    Also erstmal den Doctype:
    Code:
    <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
    So nun die Fehler:
    1.
    <center>

    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.

    2.
    <td width='100%' colspan='9' height='5' bgcolor='#FFFFFF'></td>

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. 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 "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.

    3.
    [img]gfx/3eckau1.gif[/img]

    there is no attribute "border".

    4.
    <font color = 'blue'>
    element "font" undefined.

    Die anderen sind so ähnlich.

    Irgendwie vertragen sich die Elemente scheinbar mit dem Doctype nicht so ganz. Aber gibt es denn diese ganzen Dinge bei XHTML nicht mehr? Wenn ich den Doctype auf HTML stelle, dann zeigt er halt die Tags die mit "/>" enden als Fehler an.

    Gruß

  • #2
    wie wäre es wenn du das strict änderst?

    Kommentar


    • #3
      Was meinst du damit? ^^°

      Kommentar


      • #4
        es gibt 2 varianten für gültige html dateien (+1 für framesets). entweder du änderst die variante auf die etwas genügsamere oder du schaust dir bei selfhtml mal die liste aller nicht erlaubten elemente und attribute an.

        Kommentar


        • #5
          naja das strict bedeutet doch wenn ich mich nicht irre das zu 0,0% abgewichen werden darf, solltest du jetzt wieder auf HTML stellen, aber Transitional, dann mal schauen was er ausspuckt.

          Kommentar


          • #6
            Hatte jetzt auch gegoogelt und gesehen dass man es auf Strict oder Transitional stellen kann. Wenn ich es auf Transitional stelle, sind die Fehler tatsächlich weg
            Aber wieso gibt es denn bei XHTML keine Attribute mehr in td? Soll man das dort nur noch per CSS machen oder wie?

            @nikosch
            Hättest du evtl. ein Link zu der von dir gemeinten Self HTML Seite?

            Gruß

            Kommentar


            • #7
              du kennst selfhtml nicht?

              http://de.selfhtml.org

              Kommentar


              • #8
                Ne ich meine den speziellen Unter Link, weil manchmal sucht man sich ja einen Wolf ^^

                Aber ich habe es gefunden und ich muss sagen sehr intressant das ganze.

                Gruß

                Kommentar


                • #9
                  Nun ja, all die Fehler beziehen sich ja auf Design-technisches. Warum lagerst du solche Sachen nicht aus und machst es in CSS?

                  Code:
                  .center{
                  text-align: center;
                  }
                  
                  
                  .table{
                  width:100%;
                  height: 5px; //bzw. was sind 5 müsstest du hier halt anpassen
                  }
                  
                  
                  .img{
                  border: 0;
                  }
                  
                  
                  .color{
                  color: blue;
                  }
                  in ne main.css speichern, im html auf diese verlinken.

                  Code:
                  <link rel="stylesheet" type="text/css" href="Pfad zur main.css datei" />
                  und im html file diese Klassen dann den jeweiligen tags zuordnen à la

                  1. <span class="center">Zentrierter Text</span>
                  2. <td class="table" colspan="2"> .....
                  etc.

                  Dann klappts auch mit stict. So solltest du zumindest diese Fehler auch auf strict bekommen, ich empfehle dir ganz allgemein design in css und code zu trennen...

                  Kommentar


                  • #10
                    Wieso ich das nicht auslagere? Weil ich das seit ich meine erste "Hallo Welt!"-Seite in HTML geschrieben habe, so mache ^^
                    Aber stimmt schon, man kann es auch auslagern, ich muss mich halt nur dran gewöhnen

                    Gruß

                    Kommentar


                    • #11
                      lol "Hallo Welt!"-Seite

                      Kommentar


                      • #12
                        Re: Frage bezüglich HTML Validator

                        Zitat von <Daniel>
                        So nun die Fehler:
                        1.
                        <center>

                        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)

                        2.
                        <td width='100%' colspan='9' height='5' bgcolor='#FFFFFF'></td>
                        <td width=100% colspan=9 height=5
                        [...]
                        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 "Transitional" document
                        [...]
                        (this is usually fixed by using CSS to achieve the desired effect instead).
                        [...]

                        How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.

                        3.
                        [img]gfx/3eckau1.gif[/img]
                        falsch geschrieben ...

                        there is no attribute "border".


                        4.
                        <font color = 'blue'>
                        element "font" undefined.

                        Die anderen sind so ähnlich.

                        Irgendwie vertragen sich die Elemente scheinbar mit dem Doctype nicht so ganz. Aber gibt es denn diese ganzen Dinge bei XHTML nicht mehr? Wenn ich den Doctype auf HTML stelle, dann zeigt er halt die Tags die mit "/>" enden als Fehler an.
                        wer lesen kann ist klar im vorteil

                        Kommentar


                        • #13
                          @phpdummi
                          Hast du den Thread wenigstens überflogen?!
                          Das Problem ist schon längst gelösst und es lag an dem STRICT im Doctype.

                          Kommentar


                          • #14
                            @daniel
                            ich denke phpdummi will damit nur sagen das STRICT nicht heisst zeig mehr Fehler an sondern Strict bedeutet nur das er den HTML Code sehr sehr genau nimmt und deshalb auch die Fehler. Die Fehler sind schon da, aber Transitional kann damit umgehen auch wenn es weiterhin Fehler bleiben die auch für Stricht behoben werden können.

                            Kommentar


                            • #15
                              genau

                              Kommentar

                              Lädt...
                              X