horizontal lines in web pages

Re: horizontal lines in web pages

by Joseph Rézeau -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Well, pressing SHIFT+ Enter is a pretty standard way of creating what is called a "soft carriage return" in most word processors and also HTML editors (e.g. Dreamweaver). Below is the HTML code, followed by the WYSIWIG result. The <br /> tag is created by SHIFT+RETURN.

<p>this is a one-line paragraph</p>
<p>this is a new one-line paragraph</p>
<p>this is another line <br />
  immediately followed by yet another line
</p>

this is a one-line paragraph

this is a new one-line paragraph

this is another line
immediately followed by yet another line

Please note, however, that the soft carriage return (or <br /> tag) should be used sparingly, and CSS formatting should be preferred if one wants a number of successive lines which are not to be considered as paragraphs. For example, use list formatting (with or without bullets, numbers, etc.)
<ul>
  <li>this is line 1 in a bullet list </li>
  <li>this is line 2 in the same list </li>
</ul>
  • this is line 1 in a bullet list
  • this is line 2 in the same list
<ul style="list-style:none">
  <li>this is line 1 in a non-bullet list</li>
  <li>this is line 2 in the same list  </li>
</ul>
  • this is line 1 in a non-bullet list
  • this is line 2 in the same list

Hope that helps,

Joseph