theme-sticky-logo-alt

This Is Your Brain on what is the correct html element for inserting a line break?

0 Comments

The correct HTML element for inserting a line break is

. Without it, you will wind up with an extra line break character at the beginning or end of your code.

The only thing that I can think of is using a line break character in the

 tag, or the 
 tag. Neither of those are the correct way to do it. 

The correct HTML element for inserting a line break is. Without it, you will wind up with an extra line break character at the beginning or end of your code.The only thing that I can think of is using a line break character in the tag, or the tag. Neither of those are the correct way to do it.

This is a good question! In the last couple of years we’ve seen a lot of new HTML elements in the wild, so I’m not sure if there is a specific name for what you want to do, but I thought I’d include a few of the most common ones.

I can think of several different ways to go about it. One is to just take the line breaks and put them in a variable. Another is to actually put the quotes around the line break and then append the line break character to the end of the string. An even easier way is to use new HTML tags. So lets say you want to add a line break after the fourth paragraph.

The HTML tag

takes that and makes it an actual line break. This will be replaced with a

tag, but its name is still

. If you want to append to that you can use the

 tag because it has a line break as a child. 

If you want to make another line break you can use a tag and append to that tag. So we have something like

This is a line break

Now we could set this up like this and have all the lines between each of the paragraphs be line breaks. Or we could just do a

 tag and let the browser insert the real line breaks as needed. 

You are correct. You can put a line break in, but you need to put it after the tag. The proper way is to use . But if you want to use

you will need to wrap the line breaks in

.

Okay, now let me stop here for a second to give you a quick little quiz. If you know the difference between a line break and a tag, you should be able to figure this out.

A line break is a type of word or character that is inserted between two lines of text. A paragraph tag is not a line break, it is an element with attributes that define the beginning and end of a paragraph. A tag is not a line break. To put a line break in, you need to put it after the element, not before, and you need to remove the element from the start of the paragraph.

Previous
Next

0 Comments

Leave a Reply

15 1 0 4000 1 https://a1meatsupply.com 300 0