Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you split HTML code between two lines?

Tags:

html

I have a very long line of HTML. I tried turning:

<code><othercode>

into

<code><
othercode>

But it breaks the HTML, and I tried:

<code>
<othercode>

But it puts a space between the images. In python you can just put a '\' at the end of the line. Is there something similar in HTML?

Thanks.

like image 864
Nathron Avatar asked Dec 10 '10 22:12

Nathron


People also ask

How do you split text in HTML?

The splitText() method breaks the Text node into two nodes at the specified offset index, keeping both nodes in the tree as siblings. After Splitting the text, the main node contains all the content up to the specified offset index point, and a newly created node of the same type contains the remaining text.

How do I make one space between lines in HTML?

HTML Break (<br>) Tag If you want to prevent a line break between two words, use a non-breaking space. If you want to insert a line break, use the HTML break tag, written as <br>. You don't need a closing tag here — just writing <br> adds a line break.


1 Answers

You can't separate the opening of the tag (<) from the tag identifier (in this case, "othercode"). So this won't work:

<code><
othercode params=...>

but this will:

<code><othercode
params=...>

Hope that helps.

like image 167
Chris Cashwell Avatar answered Sep 30 '22 22:09

Chris Cashwell