Een minimaal HTML5-document

Een minimaal HTML5-document

HTML5 is de nieuwste versie HTML, die nog steeds wordt ontwikkeld. Websites worden steeds meer voorzien van verschillende soorten media, het gebruik van het internet is ook gewijzigd. HTML5 biedt nieuwe mogelijkheden die het gebruik van nieuwe technieken makkelijker maakt.

Een HTML5 document zal minimaal uit de volgende regels bestaan:

<!DOCTYPE html>
<html lang="nl">
  <head>
    <meta charset="utf-8">
    <title>title</title>
  </head>
  <body>
    <!-- pagina inhoud -->
  </body>
</html>

Doctype

De docktype is bij HTML vereenvoudigd. Waar eerder attributen waren om .dtd bestanden te linken is de HTML5 variant kort en eenvoudig.

<!DOCTYPE html>

Html-tag

De tag heeft voor zoekmachines een taal attribute om de taal van de website te definiƫren.

<html lang="nl">

Head

De tag bevat een een meta-tag met de charset. Wat opvalt is dat de tag anders wordt afgesloten. Waar eerder werd gebruikt wordt bij HTML5 gebruikt.

<meta charset="utf-8">

Lees ook

How I added my Porsche EV to Homekit

Since my childhood, I have been passionate about cars and everything related to them. Even at a young age, I knew every model. I spent hours flipping through car magazines searching for new facts and always dreamed of owning an exotic car. Initially, I used to dream of owning a Ferrari, but as I grew older and wiser,…

Continue reading

CSS-only Carousel Slider

As a frontend developer, my days are primarily filled with crafting JavaScript-based components using frameworks like Vue, React, or Angular. These frameworks excel at empowering me to create reusable frontend elements, whether it's buttons, modals, links, or accordions. However, as I reflect on my reliance on these…

Continue reading

Homekit `Power consumption` sensor

Recently, I purchased a HomeWizard Wi-Fi P1 Meter. This device provides me with insights into the electricity and gas usage in my home. With 4 solar panels installed, I anticipate generating excess electricity during the spring and summer months. Despite knowing the capacity of the panels, I am unsure of the exact…

Continue reading