Answer the question
In order to leave comments, you need to log in
Does HTML use tabs for lines of code?
Are there generally accepted coding conventions for HTML, and is there a correct one among the following?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; UFT-8" />
</head>
<body>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; UFT-8" />
</head>
<body>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
As already answered, it is better to listen to the W3C.) They are more kawaii. And they believe that:
- Instead of a tab, two spaces are better.
- Not everywhere you need even this.
For example, as I understand these words, you can miss the indent between the wrapper and the only content. Those. something like this:
<!doctype html>
<head>
<meta charset="utf-8" /> <!-- Не обижайте html5! -->
</head>
<body>
<header>
<h1></h1>
<p></p>
<header>
<main>
<article></article>
<main>
</body>
</html>
I'm used to always using tabs in html, css, js
I didn't find why 2 or 4 spaces are better, but shtorm can be configured as needed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question