How To Mark Google Auto-Placed Ads as Advertising

For some time now, Google Adsense offers the option of having Adsense automatically place ads on a website. This leaves the ad positioning to Google’s AI. Ideally, this can lead to better advertising revenue. There’s just one catch: the ads aren’t always labeled as adverts or adverts.

The Problem With Auto-Placed Ads

If Google Adsense automatically inserts advertisements into a website, these should of course also be marked as advertisements. But what if that is not the case? After all, as a webmaster you don’t know where Google is placing the ads – especially since that can change permanently.

Read more

PHP: How Can I Find Out, Whether A Number Is Odd Or Even With The Modulo Operator?

There is a simple way in PHP to find out, wheather a number is odd or even. All you need is the modulo operator.

What is the modulo operator?

The modulo operator in PHP is represented by an %. With this operator you can determine the rest of an interger division.
Here’s an example:

Read more

Display A HTML-List Horizontally

Normally a HTML-list is displayed vertically, which means that each entry is below the previous entry. But for some reasons you might want to display the list vertically, e.g. for a menubar.
Here is a simple way to do that.

For this example I’ll use the following list:

<ul>
	<li>Item 1</li>
	<li>Item 2</li>
	<li>Item 3</li>
</ul>

The result looks like this:

  • Item 1
  • Item 2
  • Item 3

Now, we add some CSS:

Read more

How To Alter Background Colours Of HTML Table Rows With jQuery

If you have long lists of data displayed as tables, it may be a bit confusing to read a line across its columns. But there is an easy way to make your tables more readable. Just alter the background-colour of your list line-by-line. In this post I’ll show you how to do this by using … Read more