Help:Editing: Difference between revisions

m
mNo edit summary
Line 39: Line 39:
You may want to keep this page open in a separate browser window for reference. If you want to try out things without danger of doing any harm, you can do so in the [[Sandbox]].
You may want to keep this page open in a separate browser window for reference. If you want to try out things without danger of doing any harm, you can do so in the [[Sandbox]].


=== Sections, paragraphs, lists and lines ===
=== Sections, paragraphs, lists and lines ===
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<th>What it looks like</th>
<th>What you type</th>
</tr>
<tr>
<td>
Start your sections with header lines:


<!-- This is the original
{| cellspacing="0" cellpadding="2" border="1"
|-
! What it looks like
! What you type
|-
|
Start your sections with header lines: <!-- This is the original
== New section ==
== New section ==
=== Subsection ===
=== Subsection ===
==== Sub-subsection ====
==== Sub-subsection ====
  -->
  --> <!-- next set
 
<!-- next set
<h2> New section </h2>
<h2> New section </h2>
<h3> Subsection </h3>
<h3> Subsection </h3>
<h4> Sub-subsection </h4>
<h4> Sub-subsection </h4>
  -->
  --> <!-- This code prevents confusion in the section editing feature--> '''<font style="font-size: 120%;">New section</font>'''


<!-- This code prevents confusion in the section editing feature-->
'''<font style="font-size: 110%;">Subsection</font>'''
<b><font style="font-size:120%"> New section </font></b>


<b><font style="font-size:110%"> Subsection</font></b>
'''<font style="font-size: 100%;">Sub-subsection</font>'''
 
<b><font style="font-size:100%"> Sub-subsection</font></b>
 
</td>
<td><pre><nowiki>


| <pre>
== New section ==
== New section ==


Line 76: Line 67:


==== Sub-subsection ====
==== Sub-subsection ====
</nowiki></pre>
</pre>  
</td>
|-
</tr>
|
<tr>
[[En:newline|Newline]]:  
<td>
[[en:newline|Newline]]:
 
A single
newline
has no
effect on the
layout.


But an empty line
A single newline has no effect on the layout.  
starts a new paragraph.


(<nowiki><p></nowiki> disables this paragraphing until <nowiki></p></nowiki> or the end  of the section)
But an empty line starts a new paragraph.


(in Cologne Blue two newlines and a div tag give just one newline; in the order newline, div tag, newline, the result is two newlines)
(<nowiki><p></nowiki> disables this paragraphing until <nowiki></p></nowiki> or the end of the section)  


</td>
(in Cologne Blue two newlines and a div tag give just one newline; in the order newline, div tag, newline, the result is two newlines)
<td>
<pre><nowiki>


| <pre>
A single
A single
newline
newline
Line 107: Line 88:


But an empty line
But an empty line
starts a new paragraph.</nowiki></pre>
starts a new paragraph.</pre>  
</td>
|- valign="top"
</tr>
| You can break lines<br> without starting a new paragraph.
<tr valign="top"><td>You can break lines<br>
Sufficient as wikitext code is &lt;br&gt;, the XHTML code &lt;br /&gt; is not needed, the system produces this code.
without starting a new paragraph.<p>
 
Sufficient as wikitext code is &lt;br&gt;, the XHTML code &lt;br /&gt; is not needed, the system produces this code.</p></td>
| <pre>You can break lines&lt;br&gt;
<td><pre><nowiki>You can break lines<br>
without starting a new paragraph.</pre>  
without starting a new paragraph.</nowiki></pre>
|-
</td>
|
</tr>
*Lists are easy to do:  
<tr>
**start every line with a star  
<td>
***more stars means deeper levels  
* Lists are easy to do:
*A newline  
** start every line with a star
*in a list
*** more stars means deeper levels
 
*A newline
marks the end of the list.  
*in a list
 
marks the end of the list.
*Of course  
*Of course
*you can  
*you can
*start again.
*start again.


</td>
| <pre>* Lists are easy to do:
<td><pre><nowiki>* Lists are easy to do:
** start every line with a star
** start every line with a star
*** more stars means deeper levels
*** more stars means deeper levels
Line 140: Line 119:
*start again.
*start again.


</nowiki></pre>
</pre>  
</td>
|-
</tr>
|
<tr>
#Numbered lists are also good  
<td>
##very organized  
# Numbered lists are also good
##easy to follow  
## very organized
#A newline  
## easy to follow
#in a list
#A newline
 
#in a list
marks the end of the list.  
marks the end of the list.
 
#New numbering starts
#New numbering starts  
#with 1.
#with 1.


</td>
| <pre># Numbered lists are also good
<td><pre><nowiki># Numbered lists are also good
## very organized
## very organized
## easy to follow
## easy to follow
Line 163: Line 141:
#New numbering starts
#New numbering starts
#with 1.
#with 1.
</nowiki></pre>
</pre>  
</td>
|-
</tr>
|
<tr>
*You can even do mixed lists
<td>
*#and nest them
* You can even do mixed lists
*#*like this<br>or have newlines<br>inside lists
 
| <pre>* You can even do mixed lists
*# and nest them
*# and nest them
*#* like this<br>or have newlines<br>inside lists
*#* like this&lt;br&gt;or have newlines&lt;br&gt;inside lists</pre>  
</td>
|-
<td><pre><nowiki>* You can even do mixed lists
|
*# and nest them
*You can also  
*#* like this<br>or have newlines<br>inside lists</nowiki></pre>
</td>
</tr>
<tr>
<td>
* You can also
**break lines<br>inside lists<br>like this
**break lines<br>inside lists<br>like this
</td>
 
<td><pre><nowiki>* You can also
| <pre>* You can also
**break lines<br>inside lists<br>like this</nowiki></pre>
**break lines&lt;br&gt;inside lists&lt;br&gt;like this</pre>  
</td>
|-
</tr>
|
<tr>
;Definition list&nbsp;
<td>
:list of definitions  
; Definition list : list of definitions
;item&nbsp;
; item : the item's definition
:the item's definition
</td>
 
<td><pre><nowiki>; Definition list : list
| <pre>; Definition list&nbsp;: list
of definitions
of definitions
; item : the item's definition</nowiki></pre>
; item&nbsp;: the item's definition</pre>  
</td>
|-
</tr>
|
<tr>
<td>
:A colon indents a line or paragraph.
:A colon indents a line or paragraph.
A manual newline starts a new paragraph.
*This is primarily for displayed material, but is also used for discussion on [[Help:Talk page|Talk pages]].
| <pre>: A colon indents a line or paragraph.
A manual newline starts a new paragraph.
A manual newline starts a new paragraph.
* This is primarily for displayed material, but is also used for discussion on [[Help:Talk page|Talk page]]s.
</pre>  
</td>
|- valign="top"
<td><pre><nowiki>: A colon indents a line or paragraph.
| <pre>IF a line of plain text starts with a space THEN
A manual newline starts a new paragraph.
</nowiki></pre>
</td>
</tr>
<tr valign=top>
<td>
<pre><nowiki>IF a line of plain text starts with a space THEN
   it will be formatted exactly
   it will be formatted exactly
     as typed;
     as typed;
Line 220: Line 191:
   * program source code
   * program source code
   * ASCII art;
   * ASCII art;
   * chemical structures;</nowiki></pre>
   * chemical structures;</pre>  
 
WARNING If you make it wide, you [[En:page widening|force the whole page to be wide]] and hence less readable. Never start ordinary lines with spaces.<br>  
WARNING If you make it wide,
<center>(see also below)</center>  
you [[en:page widening|force the whole page to be wide]] and
| <pre> IF a line of plain text starts with a space THEN
hence less readable. Never start ordinary lines with spaces.<br>
<center>(see also below)</center>
</td>
<td><pre><nowiki> IF a line of plain text starts with a space THEN
   it will be formatted exactly
   it will be formatted exactly
     as typed;
     as typed;
Line 238: Line 205:
   * program source code
   * program source code
   * ASCII art;
   * ASCII art;
   * chemical structures;</nowiki></pre></td>
   * chemical structures;</pre>
</tr>
|- valign="top"
<tr valign="top"><td><center>Centered text.</center>
| <center>Centered text.</center>  
</td>
| <pre>&lt;center&gt;Centered text.&lt;/center&gt;</pre>  
<td><pre><nowiki><center>Centered text.</center></nowiki></pre>
|-
</td>
| A [[En:horizontal dividing line|horizontal dividing line]]: above  
</tr>
<tr>
<td>A [[en:horizontal dividing line|horizontal dividing line]]: above
----
----


and below.
and below.
 
Mainly useful for separating threads on Talk pages.  


Mainly useful for separating threads on Talk pages.
| <pre>A horizontal dividing line: above
</td>
<td><pre><nowiki>A horizontal dividing line: above
----
----
and below. </nowiki></pre>
and below. </pre>  
</td>
|}
</tr>
</table>


Summarizing the effect of a single newline: no effect in general, but it ends a list item or indented part; thus changing some text into a list item, or indenting it, is more cumbersome if it contains newlines, they have to be removed; see also [[w:Wikipedia:Don't use line breaks]].
Summarizing the effect of a single newline: no effect in general, but it ends a list item or indented part; thus changing some text into a list item, or indenting it, is more cumbersome if it contains newlines, they have to be removed; see also [[W:Wikipedia:Don't use line breaks]].


=== Links, URLs ===
=== Links, URLs ===
18

edits