Non preoccupatevi se questi esempi utilizzano i tag che non hai imparato.
Imparerete su di loro nei prossimi capitoli.
Documenti HTML
Tutti i documenti HTML devono iniziare con una dichiarazione del tipo: <!DOCTYPE html> .
Il documento HTML si inizia con <html> e termina con </html> .
La parte visibile del documento HTML è tra <body> e </body> .
Esempio
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Prova tu stesso " HTML intestazioni
Intestazioni HTML sono definiti con le <h1> a <h6> tag:
Esempio
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
Prova tu stesso " I paragrafi HTML
Paragrafi HTML sono definiti con il <p> tag:
Link HTML
Link HTML vengono definite con il <a> tag:
La destinazione del collegamento è specificato nel href attributo.
Gli attributi sono utilizzati per fornire ulteriori informazioni su elementi HTML.
Immagini HTML
Immagini HTML sono definiti con il <img> tag.
Il file sorgente ( src ) , testo alternativo ( alt ) , e le dimensioni ( width and height ) sono forniti come attributi:
Potrete saperne di più su attributi in un capitolo successivo.