Formatting articles
Sunday, 18 February 2007, michuk
This is a short guide to formatting articles that are to be published on PolishLinux.org website. It is not a must but it will help us a lot if you follow these rules.
The articles are formatted in simple XHTML (version 1.0 Transitional) just like the rest of the website. Basic knowledge of this standard it therefore required to create a valid, properly formetted article for our vortal. Of course you don’t need to create the whole webpage in XHTML, but only the part concerning formatting of the specific article. If you plan to learn more about XHTML, visit the official website. Here we are going to present only a few tips specific to our vortal.
First of all — avoid including any styles in your article. The CSS stylesheet created for the vortal is quite universal and it covers most of the things you would expect. Thus, no inline styles are required. You have to concentrate on the structure of your text and add the XHTML tag accordingly to this structure.
Here are the tags you may need:
- Element
<h3>— this is how you mark the titles of the paragraphs. Depending on the article’s length, there may be 2-8 titles like this in the text. - Paragraph
<p>— this should be used to mark all paragraphs. This basically means that any text that is not a title, a list or a table should be inside paragraphs. - Lists
<ul>and<ol>— all lists should be marked using these tags (ulfor unordered list,olfor ordered). Every single list element is marked by<li>. The lists can be nested if needed. - Tables
<table>— tables are used to present more sophisticated data like statistics or comparisons. A properly formatted table should consist of at least these elements:<table>,<tbody>,<tr>and<td>. The columns describing others should be marked with<th>instead of<td>. Of course the size of the table depends on date you want to present. Be reasonalbe however, because the article has a maximum width of 500 pixels. - Code and commands
<code>— all the code listings and commands used in your article, as well as the names of programs, variables, etc should be marked with<code>. If the listing is important and should be divided from the article, add a<pre>tag before and after the<code>. This will produce a visual frame for your listing. - Images
<img>— the images (usually screenshots) should have a specific size. Th maximal size of the image should be 500px. The images can be centered, or floating to the right or to the left. The code used for adding an image is pretty non standard but you have to stick to it if you want your images to look good in the text:
<p class="img-right"><a href="/wp-content/rest-of-the-path/SomeImage.png"><img src="/wp-content/rest-of-the-path/SomeImage_thumb.png" alt="Alternative text" title="Image's title"/></a><br/><i>Pic.1 A sample picture</i></p>
The pictures are uploaded on the same screen on which you edit the articles. After you upload a picture (or two if you have a thumbnail and the full image — preferable), you can check its location by clicking on it. By default the images land in a subfolder of wp-content folder, basing on the current date.
- Links — hyperlinks to external websites. There should be many of them in the articles, but of course they need to be added thoughtfully. Linking to Wikipedia is always preferable. Only if the specific topic is not decribed there, consider linking to other websites. The links are simple HTML links like: <a href=”http://some_external_webpage.com”>See more on the external webpage</a>.
- Bold text
<strong>— when you want to emphasize something, use the<strong>element. Forget about<b>— it’s obsolete. - Italic text
<i>— italic is used only for nick names and all the foreign language terms.
Valid XHTML
It’s very important to produce valid XHTML code. You can check the validity of your code using a Firefox add-on like Tidy, which monitors the current webpage for errors. There are many more similar tools available so use them!
After the article is published, you should check it once again using the validator.w3.org page. Wordpress is sometimes a nast tool and likes to add some extra tags to your code making it non-valid. Double checking is then always required.
Spellchecking
Each text needs to be spell-checked before sending it to us! Firefox 2.0 has a build-in spell checker so even the most lazy of you cannot complain. Using aspell is a great option, too. A simple command like: aspell -c -l en_US text.html will help you fight all the typos and language errors in your article. It is very important to us, since double-checking for spelling errors takes a lot of time and we don’t have a lot of it
Subscribe to RSS feed for this article!
Comments
- A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
- Strong text: <strong>Strong text</strong>,
- Italic text: <em>italic text</em>,
- Strike: <strike>
strike</strike>, - Code: <code>
printf("hello world");</code>, - Block quote: <blockquote>Block quote</blockquote>












No comments yet.