Il tag HTML Main



Descrizione

Il tag HTML <main> definisce dei contenuti importanti all' interno del documento. Si può definire solo una volta per pagina e non può essere inserito come discendente di un elemento <article>, <aside>, <footer>, <header>, <nav>.

Esempio

<!DOCTYPE html>
<html>
<body>
<main>
<h1>Learning</h1>
 <p>Learn to gain experience and try to share your knowledge with others.</p>
 <article>
   <h3>Web Development Tutorials</h3>
   <p>Consist of CSS, HTML, and PHP tutorials for 2nd Semester exams.</p>
 </article>
 <article>
   <h3>Academic Tutorials</h3>
   <p>Consist of Computer Fundamental, Computer Network tutorials for 1st Semester exams.</p>
 </article>
</main>
</body>
</html>

Produrrà il seguente risultato:

Learning

Learn to gain experience and try to share your knowledge with others.

Web Development Tutorials

Consist of CSS, HTML, and PHP tutorials for 2nd Semester exams.

Academic Tutorials

Consist of Computer Fundamental, Computer Network tutorials for 1st Semester exams.

Attributi Globali

Questo tag supporta tutti gli attributi globali descritti in - HTML - Referenze Attributi

Attributi Evento

Questo tag supporta tutti gli attributi evento descritti in - HTML - Referenze Eventi

Compatibilità Browser

ChromeFirefoxIEOperaSafariAndroid
SiSiNoSiSiNo
html_tags_reference.htm
Advertisements