indent text html code example
Example 1: html how to indent text
p {
text-indent: 50px;
}
Example 2: display object with indentaion in html
var data = {
"data": {
"x": "1",
"y": "1",
"url": "http://url.com"
},
"event": "start",
"show": 1,
"id": 50
}
document.getElementById("json").textContent = JSON.stringify(data, undefined, 2);
// <pre id="json"></pre>
Example 3: how to add an ident in html
.tab { text-indent:40px }