You must Sign In to post a response.
  • Category: HTML

    Question based on html5

    Briefly describe the correct usage of the following HTML5 semantic elements: <header>, <article>, <section>, <footer>.
  • #768355
    Let's look at a further example using a code snippet of Sectioning Elements in HTML. Example 1

    <div class="parent">
    <p>Enter Some content...</p>
    <div class="child">
    <h2>Enter Another heading</h2>
    <p>Add More content...</p>

    Example 2
    <div id="logo"> Item1 </div>
    <main role="main">
    <p>Enter you massage. </p>

    <h2> Item2</h2>

    <h2> Item3 </h2>

    Useful Reference :

  • #768358
    Header tag:
    As word suggest it is the head of the page contains links and text in BIG font. see below sample

    < h1>first text</h1>
    < h3>secondary text</h3>
    < p>Some additional information here</p>
    < /header>

    The < footer> tag defines a footer for a document or section. see below section

    < footer>
    < p>this text displayed in footer</p>
    < /footer>

    The < section> tag defines sections in a document

    The < article> tag specifies independent, self-contained content.

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #768360

    Header and Footer are similar just like in a document like we have Header and Footer for a page.
    So we can specify header and footer based on the area of webpage we need to specify

    // Type any information you want to display in the header

    // Type any information you want to display in the footer

    Article will give you summary effect of a paragraph. This Article tag might be used in home page of any website to explain about the company.


    //Display articles or summary with bulletins.


    Finally Section will make your summary or paragraph shows in the section format.
    Which is similar to the Index in any books. This is usually use Paragraph tag inside sections.

    <p>I M Paragraph</p>


  • Sign In to post your comments