HTML5 Features

HTML5 introduced many new features and elements that make web development easier and more powerful. In this post, we’ll cover some of the key features of HTML5.

New Elements

HTML5 introduced several new elements, including:

  • <article>: Defines an article.
  • <section>: Defines a section.
  • <header>: Defines a header for a document or section.
  • <footer>: Defines a footer for a document or section.

Canvas Element

The <canvas> element allows you to draw graphics using JavaScript. Here’s an example:

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #000000;">
Your browser does not support the HTML5 canvas tag.
</canvas>

<script>
    var c = document.getElementById("myCanvas");
    var ctx = c.getContext("2d");
    ctx.moveTo(0, 0);
    ctx.lineTo(200, 100);
    ctx.stroke();
</script>

Stay tuned for more detailed tutorials on HTML5!

John & Kevin
Cyber Craftsmen Team