Print Search
Content Actions
Wiki Search
Random Art
Update
 
(Well Formed Document)
Line 38: Line 38:
 
! Why
 
! Why
 
|-
 
|-
| <nowiki>This is my first paragraph.
+
| <nowiki>This is my first paragraph. <p> And this is my second.</nowiki>
<p>  
+
| <nowiki><p>This is my first paragraph.</p> <p>And this is my second.</p></nowiki>
and this is my second.</nowiki>
+
| <nowiki>
+
<p>This is my first paragraph.</p>
+
<p>and this is my second.</p></nowiki>
+
 
| The element '''p''' must have a beginning and an end.
 
| The element '''p''' must have a beginning and an end.
 
|-
 
|-
 
+
| <nowiki>This is my first line. <br> And this is my second.</nowiki>
 +
| <nowiki>This is my first line.<br/>  And this is my second.</nowiki>
 +
| The element '''br'''does not contain text, so we must use a slash at the end to indicate that the element does not continue on.
 +
|-
 +
| <nowiki><b> i like <i> fomatting </b></i>!</nowiki>
 +
| <nowiki><b> i like <i> fomatting </i></b>!</nowiki>
 +
| Improperly nested elements.
 +
|-
 +
| <nowiki><img align=right src=image.jpg></nowiki>
 +
| <nowiki><img align="right" src="image.jpg"></nowiki>
 +
| Attribute values must be quoted
 
|}
 
|}
 
In plain english, when you start a tag like <p> you must finish it with a </p>.  In the case of single tags, you can use the shorthand like <br/> instead if the incorrect <br> tag.
 
 
The reason for this is that one wrong tag can potentially mess up the whole page.  The worst part is that your browser might auto-correct for the mistake while the next browser simply wont.
 
 
When possible, don't use HTML markup.  In the wiki, use wiki markup and on the forum,use forum markup.  [i]I have a future plan to extend forum markup to the note fields where you guys often use HTML markup. [/i]
 
 
So, here are some examples
 
 
[b]Bad[/b]
 
[code]This is my first paragraph. <p> and this is my second.[/code]
 
 
[b]Good[/b]
 
[code]<p>This is my first paragraph.</p>  <p>and this is my second.</p>[/code]
 
 
[b]Bad[/b]
 
[code]This is my first line. <br> and this is my second.[/code]
 
 
[b]Good[/b]
 
[code]This is my first paragraph.<br/>  <p>and this is my second.[/code]
 

Revision as of 07:26, 8 December 2005

Purpose

There are many different places that members and especially volunteers add page markup. While, this is a positive thing, we need to try to do so in a compatibile way.


The End Result

EB Pages are XHTML 1.0 Strict. For the most people, that has little to no impact. The average user need only ensure that the XML (HTML) document is well formed.

Wiki Guidelines

In general, use as much non-HTML wiki markup as possible. Avoid using the <br/>, <p/>, <b>, <i> and <u> HTML elements just to name a few. This way we can more easily control the quality of the page layout.

Forum Guidelines

Use the forum style markup only.

HTML Guidelines

For the most part this applied to the volunteers, but it good reading for users who wish to embed html in the wiki pages (not advised, but not forbidden).

Definitions

Element 
a.k.a. Tag, A structural part of the XML document. For example, <p> </p> is a paragraph element.
Attribute 
A property of an element expressed as name and value pair. For example, <p style="font-color:red"></p> is a paragraph element whose text will be displayed in the color red.


Well Formed Document

This is the MOST IMPORTANT thing to know about HTML editing. In the earlier versions of HTML, it did not have to well formed, but now it does.

Well formed

  • For every start element there is a end element.
  • Elements are properly nested
  • All attributes have a value
  • All attribute values ar quoted with double quotes
Bad Good Why
This is my first paragraph. <p> And this is my second. <p>This is my first paragraph.</p> <p>And this is my second.</p> The element p must have a beginning and an end.
This is my first line. <br> And this is my second. This is my first line.<br/> And this is my second. The element brdoes not contain text, so we must use a slash at the end to indicate that the element does not continue on.
<b> i like <i> fomatting </b></i>! <b> i like <i> fomatting </i></b>! Improperly nested elements.
<img align=right src=image.jpg> <img align="right" src="image.jpg"> Attribute values must be quoted