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">

Reacties

Er zijn nog geen reacties, laat je reactie achter.

Laat een reactie achter

Lees ook

10 JavaScript one-liners every developer should know

Code should be readable and pragmatic. For me, that means when I look at a piece of code, I should almost instantly understand what it does. Clear code always has good variable names, is predictable, avoids unnecessary logic, and lives in the right place within a project. But sometimes you need to do something a little complex without turning the rest of your code into a mess. That’s where one-liners come in. Small, pragmatic snippets…

Continue reading

The difference between debounce and throttle

Debounce and throttle are powerful techniques, but only if you really understand what they do. I often ask about them in tech interviews, and to my surprise, many developers (even seniors) struggle to explain the difference. The good news is: it’s actually quite simple. In this post, I’ll break down both techniques and share some practical use cases. If you are unfamiliar with the techniques and are asked about them too in your interview…

Continue reading

The paradox of AI in web development

Since the start of my career as a developer, I’ve seen a lot of changes. From the rise of Dreamweaver with a WYSIWYG editor for generating table code to the arrival of jQuery and professional frameworks that completely transformed web development. Nowadays, there seems to be only one buzzword everywhere: AI.…

Continue reading