Tuesday 10 May 2016

// // Leave a Comment

HTML5 article tag

The commodity aspect is one of the new elements that accept been alien with HTML5. As this is a new aspect there has been some abashing of how to use this element. But there seems to be an acceding that you use the
aspect if you markup content, that makes faculty on its own. What does this mean? It agency that you could use the
aspect if appearance up an “about me" page, a blog entry, and aswell every animadversion to your blog entry.

But you are not declared to use the
aspect about every individual branch – the point is, whatever you put in the
aspect it is declared to accomplish faculty on its own.

Using the Flour-article, the commodity aspect should be acclimated like this (please note, that I accept replaced a lot of the absolute agreeable with three dots, so that the archetype does not yield up too abundant space):

<!DOCTYPE html>
        <body>
        <article>
                <div id="header">
                        <h1>All About Flour</h1>
                        ...
                </div>
                <div id="content">
                        <h2>The Two Types of Wheat</h2>
                                <p>There are…</p>
                        <h2>All-Purpose Flour</h2>
                                <p>All-purpose …</p>
                        ...
                </div>
        </article>
        </body>
</html>

As you can see, the aspect contains the and the as the agreeable in these two ’s can be apprehend as a accomplished article. I accept not included the as the agreeable in this aspect has annihilation to with the absolute commodity we still use a lot of div-elements in this example, but I will appearance you in the afterward capacity which new HTML5 elements you should use instead.
Sometimes you charge added than just one archetype and I’ve included another: Using the blog-entry archetype from antecedent chapters, you would use the commodity aspect to blanket anniversary blog access like this:

<article>
        <h1>Just Another Day</h1>
        <p>Written by Christina<br />
        On January 11th </p>
        <p class="content">This is my second blog entry, and I just wanted to check in on you </p>
</article>
<article>
        <h1>My First Blog Entry</h1>
        <p>Written by Christina<br />
        On January 10th </p>
        <p class="content">I’m so happy to write my first blog entry – yay!</p>
</article>


0 comments:

Post a Comment