Sintassi HTML 4.01
Il browser viene informato se la pagina rispetta o meno la sintassi oppure se utilizza i frame
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> |
Sintassi HTML5
Con HTML5 si semplifica tutto, viene introdotta un’unica possibilità!
1 |
<!DOCTYPE html> |
Pagina di esempio
1 2 3 4 5 6 7 8 9 10 11 |
<!DOCTYPE html> <html> <head> <title>HTML5: pagina di esempio</title> </head> <body> <h1>Titolo</h1> <p>Paragrafo</p> <!-- commento --> </body> </html> |