Tech News
← Back to articles

Semantic Line Breaks

read original related products more articles

Semantic Line Breaks

Summary

When writing text with a compatible markup language, add a line break after each substantial unit of thought.

Introduction

Semantic Line Breaks describe a set of conventions for using insensitive vertical whitespace to structure prose along semantic boundaries.

Many lightweight markup languages, including Markdown, reStructuredText, and AsciiDoc, join consecutive lines with a space. Conventional markup languages like HTML and XML exhibit a similar behavior in particular contexts. This behavior allows line breaks to be used as semantic delimiters, making prose easier to author, edit, and read in source — without affecting the rendered output.

To understand the benefit of semantic line breaks, consider the following paragraph from the Universal Declaration of Human Rights:

All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.

Without any line breaks at all, this paragraph appears in source as a long, continuous line of text (which may be automatically wrapped at a fixed column length, depending on your editor settings):

All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.

... continue reading