DEV Community

Iano Njuguna
Iano Njuguna

Posted on

How to automatically write html structure in VS Code

TL;DR: SHIFT + 1 + ENTER

If you are using VS code then you can use this command shift + 1 and enter to auto-populate HTML Doctype in HTML or PHP.

enter image description here

When you will press enter it will add the following code:


<!DOCTYPE html&gt
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

Top comments (0)