Expand your HTML skills through an MDN Fellowship - Apply by April 1 http://mzl.la/MDNFellowship

mozilla
Risultati di ricerca

    Aree tematiche

    Ciascun elemento HTML deve rispettare le regole che definiscono che tipo di contenuto può avere. Queste regole sono raggruppate in modelli di contenuto comuni a diversi elementi. Ogni elemento HTML appartiene a nessuno, uno, o diversi modelli di contenuto, ognuno dei quali possiede regole che devono essere seguite in un documento conforme HTML.

    Vi sono tre tipi di categorie di contenuto:

    • Le categorie del contenuto principale, che descrivono le regole comuni per il contenuto, delle quali fanno parte molti elementi
    • Le categorie relative alla figura del contenuto, che descrivono le regole comuni per gli elementi relativi alla figura
    • Le categorie dei contenuti specifici, che descrivono categorie non frequenti, condivise solo da pochi elementi, a volte solo in contesti particolari.
    Content_categories_venn.png

    Categorie del contenuto principale

    Contenuti dei Metadati

    Gli elementi appartenenti alla categoria dei metadati modificano la presentazione o il comportamento del resto del documento, impostano collegamenti ad altri documenti, o comunicano altre informazioni non in linea.

    Gli elementi che appartengono a questa categoria sono <base>, <command>, <link>, <meta>, <noscript>, <script>, <style> and <title>.

    Contenuti del flusso

    Gli elementi che appartengono alla catogoria dei contenuti del flusso tipicamente contengono testo o altri contenuti. Essi sono: <a>, <abbr>, <address>, <article>, <aside>, <audio>, <b>, <bdo>, <blockquote>, <br>, <button>, <canvas>, <cite>, <code>, <command>, <datalist>, <del>, <details>, <dfn>, <div>, <dl>, <em>, <embed>, <fieldset>, <figure>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hgroup>, <hr>, <i>, <iframe>, <img>, <input>, <ins>, <kbd>, <keygen>, <label>, <map>, <mark>, <math>, <menu>, <meter>, <nav>, <noscript>, <object>, <ol>, <output>, <p>, <pre>, <progress>, <q>, <ruby>, <samp>, <script>, <section>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <svg>, <table>, <textarea>, <time>, <ul>, <var>, <video>, <wbr> e Text.

    Pochi altri elementi appartengono a questa categoria, ma solo in determinale condizioni:

    Contenuti di sezione

    Elements belonging to the sectioning content model create a section in the current outline that defines the scope of  <header> elements, <footer> elements, and heading content.

    Elements belonging to this category are <article>, <aside>, <nav> and <section>

    Note: Do not confuse this content model with the sectioning root category, which isolates its content from the regular outline.

    Heading content

    Heading content defines the title of a section, whether marked by an explicit sectioning content element or implicitly defined by the heading content itself.

    Elements belonging to this category are <h1>, <h2>, <h3>, <h4>, <h5>, <h6> and <hgroup>.

    Note: Though likely to contain some heading content, the <header> is not heading content itself.

    Phrasing content

    Phrasing content defines the text and the mark-up it contains. Runs of phrasing content make up paragraphs.

    Elements belonging to this category are <abbr>, <audio>, <b>, <bdo>, <br>, <button>, <canvas>, <cite>, <code>, <command>, <datalist>, <dfn>, <em>, <embed>, <i>, <iframe>, <img>, <input>, <kbd>, <keygen>, <label>, <mark>, <math>, <meter>, <noscript>, <object>, <output>, <progress>, <q>, <ruby>, <samp>, <script>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <svg>, <textarea>, <time>, <var>, <video>, <wbr> and plain text (not only consisting of white spaces characters).

    A few other elements belong to this category, but only if a specific condition is fulfilled:

    • <a>, if it contains only phrasing content
    • <area>, if it is a descendant of a <map> element
    • <del>, if it contains only phrasing content
    • <ins>, if it contains only phrasing content
    • <link>, if the itemprop attribute is present
    • <map>, if it contains only phrasing content
    • <meta>, if the itemprop attribute is present

    Embedded content

    Embedded content imports another resource or inserts content from another mark-up language or namespace into the document. Elements that belong to this category include: <audio>, <canvas>, <embed>, <iframe>, <img>, <math>, <object>, <svg>, <video>.

    Interactive content

     Interactive content includes elements that are specifically designed for user interaction. Elements that belong to this category include: <a>, <button>, <details>, <embed>, <iframe>, <keygen>, <label>, <select>, and <textarea>.
    Some elements belong to this category only under specific conditions:

    Form-associated content

    Form-associated content comprises elements that have a form owner, exposed by a form attribute. A form owner is either the containing <form> element or the element whose id is specified in the form attribute.

     This category contains several sub-categories:

    listed
    Elements that are listed in the form.elements and fieldset.elements IDL collections. Contains <button>, <fieldset>, <input>, <keygen>, <object>, <output>, <select>, and <textarea>.
    labelable
    Elements that can be associated with <label> elements. Contains <button>, <input>, <keygen>, <meter>, <output>, <progress>, <select>, and <textarea>.
    submittable
    Elements that can be used for constructing the form data set when the form is submitted. Contains <button>, <input>, <keygen>, <object>, <select>, and <textarea>.
    resettable
    Elements that can be affected when a form is reset. Contains <input>, <keygen>, <output>,<select>, and <textarea>.

    Transparent content model

    If an element has a transparent content model, then its contents must be structured such that they would be valid HTML 5, even if the transparent element were removed and replaced by the child elements.

    For example, the <del> and <ins> elements are transparent:

    <p>We hold these truths to be <del><em>sacred &amp; undeniable</em></del> <ins>self-evident</ins>.</p>
    

    If those elements were removed, this fragment would still be valid HTML (if not correct English).

    <p>We hold these truths to be <em>sacred &amp; undeniable</em> self-evident.</p>
    

    Other content models

    Sectioning root.

    Etichette del documento e nomi di chi ha collaborato alla sua stesura

    Contributors to this page: Nicola_D, teoli
    Ultima modifica di: teoli,