Content Formating Guidelines & Best Practices

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

The article title is the first thing you sell your readers. It has to be short, relevant, and SEO friendly. Try to keep your article title length under 60 characters.

Be consistent with the capitalization for your post title. We recommend using the title case. You may use this tool to convert text to title cases. For example:

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 draw emphasis to important points. If you have larger paragraphs 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 abbreviations. Never use capital cases in full sentences because it is harder to read.

Notes and Tips: You can add a note by using the 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 a different style of alert boxes.

Alert! This alert box indicates quick notice.

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

Info! This alert box indicates an informative note.

Ordered and Unordered Lists: Readers always love to skim 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 subheaders. As an SEO practice an HTML document should start with an H1 tag followed by separate larger sections with 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 in a 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, photos should be at least 1500×850 pixels
  • Although there are no standard size requirements for images in the 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> the tag will be formatted and displayed in a monospaced font.

<pre>
   //Your code here
</pre>

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!");
		}
   }
</pre>

Checkout Google Prettify documentation for list of supported languages.

By clicking “Allow All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Notice
Allow All