Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions Indentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Indentation "2 Spaces"

### Description

In computer programming, indentation it is used to format program source code to improve readability.

People use indentation to better convey the structure of their programs to human readers.

The size of the indent is usually independent of the style. For Ruby and many programming languages, and some forms of HTML formatting, two spaces per indent level is generally used.

### Examples

#### Indented Code :

```html
<div class="container show-grid">
<div class="row">
<div class="col-12">col-12</div>
</div>
<div class="row">
<div class="col-11 col-offset-1">col-11</div>
</div>
<div class="row">
<div class="col-10">col-10</div>
<div class="col-2">col-2</div>
</div>
</div>
```

#### Bad Indented Code :

```html
<div class="container show-grid">
<div class="row">
<div class="col-12">col-12</div>
</div>
<div class="row">
<div class="col-11 col-offset-1">
col-11

</div>
</div>
<div class="row">
<div class="col-10">col-10

</div>
<div class="col-2">col-2</div>
</div>
</div>
```

### References

1. [Importance of Code Indentation] (http://mrbool.com/importance-of-code-indentation/29079)
2. [Tabs vs Spaces for Indentation] (http://nithinbekal.com/posts/indentation/)