Bhekor
Bhekor

Reputation: 9

How to make an angle bracket (< and >) close with tags in html

am working on project that involves writing a complete html element i.e putting the tags in between the angle bracket <html>, it's works but the tags and the angle brackets are having some padding or margin or space, but I want it close just like it will normally shows in text-editors. Check this W3Schools example http://www.w3schools.com/html/default.asp and this is my code and working example https://jsbin.com/nilaku/edit?html,css,output

Upvotes: 0

Views: 2552

Answers (1)

Pavel Vladov
Pavel Vladov

Reputation: 4837

The get rid of the spaces before and after the less than and greater than signs that enclose HTML tags, you should place all elements that correspond to a single line in the output file on a single line in the source file. For example, for the <html> tag you should have all these 3 elements on one line:

<span class="ltbrac">&lt;</span><span class="eleme">html</span><span class="gtbrac">&gt;</span>

The following article shows some other possible solutions, too:

Remove Whitespace Between Inline Elements

Upvotes: 3

Related Questions