Line Breaks

Encycodepedia is a reference guide to the common syntax and terminology used in everyday programming.

Encycodepedia HTML covers the structural component of building websites.


Syntax Summary

As we saw with the <p> tag, issuing text to an HTML document doesn't work in the same manner and fashion that you would come to expect from a word processor.

The most noticeable difference has to be when it comes to breaking up paragraphs to form new lines. As a simple press of the return key would be expected to create a new line of text anywhere else, but with HTML, it doesn't work that way.

This is where we learn about the line-break tag, and how to modify HTML text to standard form.


How to...

As you can see in the example for the Paragraph-tag, we have entered in multi-lined text, like so...

Now notice how the text doesn't break to another line when called for? That is because your web browser doesn't read text the same way we do. It needs textual cues to know when to present information in a distinct fashion.

For example, if you want to create a break in a line of text, you will need to cue the browser to do so with the line-break tag, or <br>. Watch...

See how that works? 

By now, you're asking why do we have to take this step...because it's so convoluted. To which I will reply, believe me, this is actually the shortcut.

A paragraph tag is to embody a paragraph, which in grammar, is a collection of sentences to represent a similar focus of thought...blah blah blah. In HTML, a paragraph is kind of the same, it represents a section. Sometimes, you don't want to break up the section because there is more information to provide. In all reality, our code should look more like this...


Give It a Go

Alrighty, let's give this a try, ready...let's do this...

.