Elemente imbricate
Am vorbit in lectia lectia cealalta despre elementele HTML (ce sunt elementele, ce sunt tag-urile, etc), iar acum am sa va arat cum putem scrie elemente HTML imbricate (unele in interiorul altora).Avem urmatorul exemplu:
<!DOCTYPE html> <html> <head> <title>Exemplu Elemente Imbricate </title> </head> <body> <h1>Acesta este un titlu <em>italic</em></h1> <p>Acesta este un pragarf cu <u>underline</u></p> </body> </html>
Acest cod va avea urmatorul rezultat:
Acesta este un titlu italic
Acesta este un pragarf cu underline
Nu este chiar atat de greu, doar trebuie sa respectam ordinea deschiderii si inchiderii tagurilor.