- NBSP is a digital typesetting tool.
- The non-breaking space works to ensure that no line break will split a particular set of words at any certain point in an HTML document or Unicode.
- The non-breaking space works by keeping text processing software from inserting any automatic line breaks. By using the symbol it effectively guarantees that no line break will be inserted between two or more words, images, videos, or other elements and maintains white space between them at all times.
The advent of word processing brought with it a tremendous change to the world of computing. No longer were computers reserved specifically for mathematics and science — Now, the computer had a purpose in the office, home, and classroom, as well. At the time of its invention, word processing (and, by extension, word processor devices, and programs) was simply reserved for writing, editing, formatting, and outputting text. Today, word-processing devices and programs come with entire suites of features and tools and can be found on cell phones, tablets, desktop computers, laptops, video game consoles, and smartwatches.
With word processing came digital typesetting. Digital typesetting — or the arrangement of text on a computer or device’s screen in the form of characters, letters, and symbols — brought with it many fonts, tools, and rules. One such digital typesetting tool is the non-breaking space or NBSP.
What is Non-Breaking Space?: Complete Explanation
As word processing and digital typesetting became more advanced, around the time the Internet first began to emerge in the world, there emerged a need for something called markup language. A markup language is a term used to describe the code — kind of like a virtual rulebook — that dictates the kind of information and data included within a document when opened by computer programs and users. Markup language manifests itself in the form of code, meaning that it only controls the look and function of a digital document or webpage and doesn’t actually appear in the text or copy itself. It merely exists to properly format the content and allow it to be processed by word processors and the Internet.
HTML is one such markup language. As a matter of fact, it’s the go-to markup language for documents designed for the web. HTML — meaning HyperText Markup Language — is built upon something called HTML elements. These HTML elements help construct text, copy, images, videos, and other interactive content embedded into a webpage’s code. The non-breaking space, or NBSP, is one of many examples of an HTML element.
The non-breaking space works to ensure that no line break will split a particular set of words at any certain point in an HTML document or Unicode. In HTML or Unicode, you would use “ ” to symbolize a non-breaking space. A non-breaking space differs from traditional spaces in HTML documents because it serves as a fixed space or hard space. The non-breaking space is cumulative, meaning that it’s actually rendered on the page. This differs from traditional spaces that are deleted by browsers in the rendering stage.
A fixed space or hard space can be particularly useful when used inside HTML or Unicode
tags. For instance: “
Ultimately, the non-breaking space exists to be a character entity that places a definite white space between words or elements and prevents the browser from splitting that white space into separate lines. Without the non-breaking space, the web browser is free to break up the text, copy, and content as it sees fit in order to make the content flow as best as it can. With a non-breaking space, you can ensure that text, images, videos, tables, and other elements will not be improperly split or spaced out between two lines.
Non-Breaking Space: An Exact Definition
In short, the non-breaking space (or NBSP) is an HTML coding element that establishes a fixed white space between text or other elements on a web page. It effectively prevents the web browser from splitting the elements between two lines. Its symbol is “ .”
How Does Non-Breaking Space Work?
The non-breaking space works by keeping text processing software from inserting any automatic line breaks. By using the symbol “ ”, it effectively guarantees that no line break will be inserted between two or more words, images, videos, or other elements and maintains white space between them at all times. The non-breaking space is a fixed space or hard space that cannot be overlooked or collapsed to fit the web browser’s automatic formatting.
Where Did Non-Breaking Space Originate From?
The non-breaking space originated with the creation of the markup language HTML. It was first developed in an early form in 1980 by Tim Berners-Lee, a physicist from the University of Oxford and Massachusetts Institute of Technology. Berners-Lee continued to work on and improve this early form until 1989, when he proposed a web hypertext system he called HTML.
Berners-Lee and his colleague Robert Cailliau sought funding for a couple of years until 1991 when they were first able to make a description of HTML publicly available. In a document they named “HTML Tags,” Berners-Lee and Cailliau outlined the first 18 elements of HTML’s earliest and simplest design. They based their elements on the markup language used at their workplace, the European Organization for Nuclear Research (or CERN). This is where the non-breaking space originated.
What Are the Applications of Non-Breaking Space?
When looking at your keyboard and using your word processor of choice, there is typically a combination of keys you can use to apply a non-breaking space to your document. These include the following:
- Ctrl + Alt + Space (or Ctrl + Space, or Alt + 0160 or 255 on a num pad) for Microsoft Windows
- Ctrl + Shift + Space for Microsoft Word
- Option + Space for macOS
- Ctrl + Space (or Ctrl + Shift + Space) for LibreOffice
- or simply typing “ ”.
Examples of Non-Breaking Space in the Real World
Establishing Non-Breaking or Non-Collapsing Spaces
When working with HTML, an NBSP allows users to keep text processors and web browsers from inserting or collapsing spaces between a particular set of words. Not only does this prevent line breaks, but it also stops browsers from reducing the amount of white space between the specified string of words as well.
Defining Empty Cells in A Table
When creating a table on a web page, it’s possible you might need to have a cell with no text, characters, or symbols in it. That doesn’t mean you don’t want it to be there. It just means you want it to remain empty. To prevent browsers and pages from collapsing the empty cells, you can insert an NBSP.
- The 5 Best Laptops for Coding and Programming
- Fortran Programming Language: History, Origin, and More
- Complete History of the Operating System