How to Format Your Post?

A well formatted articles are easy to read and index higher on search results. This document outlines some of the content formatting best practices we follow for all StackTips articles. If you’re an author or a contributor, you must follow these simple practices while editing content on this site.

1. Article Title

Article title is the first thing you sell your readers. It has to be short, relevant and SEO friendly.

  1. Try to keep your article title length under 60 characters.
  2. Be consistent with the capitalization for your post title. We recommend using title case. You may use this tool to convert text to title case. For example:

Article Title Guidelines

2. Paragraph Styles

Paragraph Formatting: Keep your paragraph short and snappy. You don’t want your readers to feel as they are reading school textbook. Short paragraphs usually draws emphasis to important points. If you have larger paragraph consider breaking them up into multiple paragraphs. Keep your paragraph not more then four or five sentences long.

Be Bold: Bold text on sentences are used to splash and highlight important points that will catch readers attention. Don’t overuse bold formatting in sentence.

Capital Letters: Use capitals for proper nouns and at abbreviations. Never use capital case in full sentence because it is harder to read.

Notes and Tips: You can add a note by using wp-alert css class to your paragraph <p> tag.

For example, you can use <p class="wp-alert">, <p class="wp-alert info"> or <p class="wp-alert warning"> to add different style of alert boxes.

Alert! This alert box indicates quick to notice.

Warning! This alert box indicates a warning that might need attention.

Info! This alert box indicates a informative note.

Ordered and Unordered Lists: Readers always love to skimmed content. Present your content in bulleted list items whenever possible. Depending on the type of information you may choose to use bulleted and numbered lists.

3. Section Headers

Organize your large post into multiple sub headers. As a SEO practice a html document should start with H1 tag followed by separate larger sections H2 tags, and paragraph titles with H3 headers, a concept that’s illustrated in the following screenshot(click to enlarge):


4. Images and Videos

All articles should always include at least one media object. Including image or video content into post always catch readers attention. Good use of media objects in article is a driving factor for search engine ranking. Following are image size specifications,

  • For standard featured images it should be 740×420 pixels
  • For featured images as cover photo should be at lest 1500×850 pixels
  • Although there is no standard size requirements for images in article body. The horizontal wide images are preferred.

5. Code Formatting

Escape your code and put it inside enclosed <pre> tag. You can use the HTML escape tool to escape your code online for free. All code snippets enclosed inside <pre> tag will be formatted and displayed in a monospaced font.

   //Your code here

We use Google Prettify for code syntax highlighting. You can add code syntax highlight by manually specifying the language of a code block.

<pre class="prettify lang-java">
   public class HelloWorld {
		public static void main(String[] args) {
        	System.out.println("Hello, World!");

Checkout Google Prettify documentation for list of supported languages.