Before you start adding content to your site you should decide which markup language you want to use: HTML or XHTML. CMSimple_XH supports both markup languages.
Default is HTML. If you are not knowledgeable about these things, simply leave it as it is.
A problem are templates and plugins that don't fulfill the quality standards of CMSimple_XH. Suppose a template or a plugin is supporting only one of both standards. Although this won't probably crash your site, your site might fail to meet internationally recognized web standards.
However if you use only templates or plugins that are listed in this wiki, you don't need to worry about this point, as everything is automatically standards compliant and following the setting of the CMSimple configuration of xhtml_endtags.
In other cases you should take care that the DTD of your template conforms to the setting of “xhtml_endtags”. Also all installed plugins should support the corresponding standard.
To check if CMSimple_XH generates HTML or XHTML code, simply go to the CMSimple settings menu:
Settings ⇒ CMS (CMSimple_XH < 1.5: Settings ⇒ Edit configuration)
Here look for the item “Xhtml Endtags”
If the input field is empty the generated code will be HTML code. If you enter “true” the editor will generate XHTML code.
The first thing to be declared in a template is the document type. If you leave it out or specify an invalid one, a browser falls back to the so-called quirks mode, which is likely to result in undesired behavior.
Doctype HTML 4.01 transitional:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Doctype XHTML 1.0 transitional:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Dynamic generation of the doctype for CMSimple_XH:
<?php if ($cf['xhtml']['endtags'] == 'true'):?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <?php else:?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <?php endif;?>
This code in the template generates the DTD dynamically according to the setting of “xhtml_endtags”. In this way templates can support both markup languages, i.e. both document types.
explain why to use transitional DTDs
<!DOCTYPE html> <html>
See also code_conventions.
Unfortunately many plugin producers offer their plugins without information about the supported DTD. Thus the user does not know if the plugin to be downloaded supports HTML, XHTML or both markup languages.
If you come across download sites offering CMSimple_XH templates or plugins that have no information about supported standards, you should ask the respective plugin producers about the supported standards.
This way you will help us to convince them to mark their offers according to CMSimple_XH guidelines or to give at least some additional information on their download pages.