Horje
How to create HTML Blank Lines and Indentation

Do not add blank lines, spaces, or indentations without a reason.

For readability, add blank lines to separate large or logical code blocks.

For readability, add two spaces of indentation. Do not use the tab key.


Good:

 <body>

<h1>Famous Cities</h1>

<h2>Tokyo</h2>
<p>Tokyo is the capital of Japan, the center of the Greater Tokyo Area, and the most populous metropolitan area in the world.</p>

<h2>London</h2>
<p>London is the capital city of England. It is the most populous city in the United Kingdom.</p>

<h2>Paris</h2>
<p>Paris is the capital of France. The Paris area is one of the largest population centers in Europe.</p>

</body> 

Bad:

 <body>
<h1>Famous Cities</h1>
<h2>Tokyo</h2><p>Tokyo is the capital of Japan, the center of the Greater Tokyo Area, and the most populous metropolitan area in the world.</p>
<h2>London</h2><p>London is the capital city of England. It is the most populous city in the United Kingdom.</p>
<h2>Paris</h2><p>Paris is the capital of France. The Paris area is one of the largest population centers in Europe.</p>
</body> 

Good Table Example:

 <table>
  <tr>
    <th>Name</th>
    <th>Description</th>
  </tr>
  <tr>
    <td>A</td>
    <td>Description of A</td>
  </tr>
  <tr>
    <td>B</td>
    <td>Description of B</td>
  </tr>
</table> 

Good List Example:

 <ul>
  <li>London</li>
  <li>Paris</li>
  <li>Tokyo</li>
</ul> 
Reffered: https://www.w3schools.com/html/html5_syntax.asp





Related Articles
What is HTML Style Guide HTML Style Guide
How to create Always Declare Document Type HTML Style Guide
How to Use Lowercase Element Names HTML Style Guide
How to Close All HTML Elements HTML Style Guide
How to Use Lowercase Attribute Names HTML Style Guide
How to create Always Quote Attribute Values HTML Style Guide
How to create Always Specify alt, width, and height for Images HTML Style Guide
How to create HTML Spaces and Equal Signs HTML Style Guide
How to Avoid HTML Long Code Lines HTML Style Guide
How to create HTML Blank Lines and Indentation HTML Style Guide
How to create Never Skip the <title> Element HTML Style Guide
What is Omitting <html> and <body> HTML Style Guide
What is Omitting <head> HTML Style Guide
How to Close Empty HTML Elements HTML Style Guide
How to Add the lang Attribute HTML Style Guide
What is Meta Data HTML Style Guide
How to Set The Viewport HTML Style Guide
How to set HTML Comments HTML Style Guide
How to use Style Sheets HTML Style Guide
How to load JavaScript in HTML HTML Style Guide
How to access HTML Elements with JavaScript HTML Style Guide
How to Use Lower Case File Names HTML Style Guide
What is File Extensions HTML Style Guide
What is the Differences Between .htm and .html? HTML Style Guide
What is Default Filenames HTML Style Guide

Single Articles
Good:HTML Style Guide
Bad:HTML Style Guide
Good Table Example:HTML Style Guide
Good List Example:HTML Style Guide

Read Full:
HTML Style Guide
Category:
Web Tutorial
Sub Category:
HTML Style Guide
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
45



Share on: