I started using CodeFormatter in sublimetext3 to sort the code. uses a style called psr2.
The issue is that it generates closing tags for link, meta or br, which I normally don't put.
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<!-- CSRF Token -->
<meta content="bRkaytOFL85XDRnXUu9rF41lkAnMpqLO6wGb7pAq" name="csrf-token">
<title>
Crear Articulo | Panel de Administración
</title>
<link href="http://emap.com.ar/css/admin.css" rel="stylesheet">
<link href="http://emap.com.ar/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="http://emap.com.ar/plugins/chosen/chosen.min.css" rel="stylesheet">
<link href="http://emap.com.ar/plugins/sceditor/themes/default.min.css" rel="stylesheet">
<link href="http://emap.com.ar/plugins/datetimepicker/jquery.datetimepicker.min.css" rel="stylesheet">
<link href="http://emap.com.ar/css/navbar.css" rel="stylesheet">
</link>
</link>
</link>
</link>
</link>
</link>
</meta>
</meta>
</meta>
</meta>
</head>
At first it is more verbose. But it occurred to me to view the source code from the browser. and All those closing tags are red and identified as missing closing tags. Trying I see that it does not give me any problem.
But I would like to know if this can know if this type of normalization is fine or I go back or if it will cause me a problem later
According to the HTML5 specification, "void" elements like
<meta>
,<link>
and<br>
in this case, must NOT have a closing tag:https://www.w3.org/TR/html5/syntax.html#elements-0
I don't know about such a plugin, but if you can disable HTML rendering it would be best, or at least the head tags.
On the other hand, PSR-2 is the code style of PHP, which I recommend you use in your project, but it has nothing to do with HTML code.
Here is the PSR-2 documentation: http://www.php-fig.org/psr/psr-2/