Is it necessary to write HEAD, BODY and HTML tags in my HTML?

This isn’t really necessary, Omitting the html, head, and body tags is certainly allowed by the HTML specs. The underlying reason is that browsers have always sought to be consistent with existing web pages, and the very early versions of HTML didn’t define those elements. When HTML 2.0 first did, it was done in a way that the tags would be inferred when missing.

I often find it convenient to omit the tags when prototyping and especially when writing test cases as it helps keep the mark-up focused on the test in question. The inference process should create the elements in exactly the manner that you see in Firebug, and browsers are pretty consistent in doing that.

For example:

<!DOCTYPE html>
<title>Test case</title>
<form action='#'>
   <input name="var1">
</form>
<section>
        <article>
            <h3>Blog Post</h3>
            <small>Posted by Adeda on febuary 27</small>
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus libero voluptatum officia, provident distinctio dolores excepturi illo assumenda iusto amet quasi fuga, ea debitis a architecto placeat ratione. Quisquam, similique.lorem Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore sunt quas dolorem quisquam harum voluptates perferendis, eum culpa totam, similique assumenda consequuntur maxime sint. Minima iusto incidunt cum veniam reiciendis.</p>
        </article>

        <article>
            <h3>Blog Post</h3>
            <small>Posted by Adeda on febuary 27</small>
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatibus libero voluptatum officia, provident distinctio dolores excepturi illo assumenda iusto amet quasi fuga, ea debitis a architecto placeat ratione. Quisquam, similique.lorem Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore sunt quas dolorem quisquam harum voluptates perferendis, eum culpa totam, similique assumenda consequuntur maxime sint. Minima iusto incidunt cum veniam reiciendis.</p>
        </article>

        <article>
            <h3>Blog Post</h3>
            <small>Posted by Adeda on febuary 27</small>
            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit.      Voluptatibus libero voluptatum officia, provident distinctio dolores excepturi illo assumenda iusto amet quasi fuga, ea debitis a architecto placeat ratione. Quisquam, similique.lorem Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore sunt quas dolorem quisquam harum voluptates perferendis, eum culpa totam, similique assumenda consequuntur maxime sint. Minima iusto incidunt cum veniam reiciendis.</p>
        </article>
    </section>

This will produce the result of the code in the browser without interuption

Try it yourself