Quantcast
Viewing latest article 2
Browse Latest Browse All 21

HTML5 doctype keyboard shortcut in WebStorm

When creating a new HTML document, more specifically, HTML5, there can be that sluggish feeling as you go to create the page: Getting the boilerplate/skeleton of the HTML structure out of the way. You’ll need something like this HTML before you can begin:

<!doctype html>
<head>
    <meta charset="UTF-8">
    <title>HTML5 doctype keyboard shortcut for WebStorm</title>
</head>
<body>

</body>
</html>

This mundane task (although a nice memory test…) can be almost completely eliminated with the use of a handy HTML5 doctype shortcut available from WebStorm.

How to use the HTML5 doctype shortcut in WebStorm

Create a blank HTML file (so that WebStorm can actually identify the shortcut), and type html:5 followed by tab.

html:5

This will expand to the following after you’ve pressed tab:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

</body>
</html>

Now you can crack on with what you actually care about – your application.

This technique will also work in PHPStorm.


Viewing latest article 2
Browse Latest Browse All 21

Trending Articles