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

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 insert special characters like &, < and > into a JSF component

If you want to insert a character like & e.g. within a JSF (Java Server Faces) component’s value attribute, you might get an error. To avoid this you must insert a HTML-Entity for the character. Here is a short list for common characters which you might need to replace in your JSF component. Character Entity … Read more

How To Load A Default Image In HTML, If Image Is Not Found

When creating HTML pages, it can always happen, that you include images into a page that can not be displayed. There are several reasons for this, for example when there is a typo in the source code or the image file has been moved or deleted. In this case, using the JavaScript event handler onerror … Read more