HTML We Can't (or shouldn't!) Use

There are several valid HTML tags we cannot or should not use on eBay auction listings, me pages, store fronts or header extensions.

Some of these, like IFRAME, EMBED, and a few others, which would actually be correct to use and would work just fine, are specified by eBay as not allowed for being tags that allow for dangerous or unfair practices.

Others, like HTML, HEAD, TITLE, META, LINK, BASE, STYLE and BODY tags should not be used simply because it is the wrong use of these tags when they are placed in the parts of eBay pages that we can add code to.

These tags in the second group are neither dangerous nor are they invalid tags or bad coding in and of themselves. It is simply not correct coding to use them within the BODY section of an existing page.

Recently an eBayer wishing to add HTML code to the expanded header section of their eBay store wrote this, in part, in an e-mail to me:

> Here is the code that I am trying to use:
>
> <html>
> <head>
> <title>Untitled Document</title>
> </head>
>
> <body bgcolor="#e0e0e0" text="#000000"> Thank you!!
>
> </body>
> </html>

My answer was this:

This is your whole problem. Your code is not wrong, it is just the wrong code for what you are doing.

What you have created is a whole mini web page. A complete web page such as this has two main sections, the HEAD and the BODY.

Every whole web page is contained within <html> and </html> tags.

The HEAD section, at the top of the document, but within the <html> tag, is itself contained within <head> and </head> tags and is where you put a variety of things that affect the page but do not display themselves. The TITLE, for example, contained within <title> and </title> tags in the head section is not the title that displays on your page or in your listing, but is rather the title of the document you are creating and is used for indexing purposes. It also displays on the top header line of some browsers.

The BODY section is where all the code that shows on the page is put. It is contained within <body> and </body> tags.

This two section HEAD and BODY arrangement is correct for any full web page. The thing is, you are not supposed to be creating a full web page for your auction listing, me page or store header extension. All of these are just one small part of a complete web page and will be inserted into the body section of an existing eBay-created document.

eBay provides all the <html>, <head>, <title>, <meta>, <link>, <style>, <body> and other tags required for creating these sections and it is incorrect to add multiples of these tags in the code we are going to insert into the page as our auction description, me page, store front or header extension.

There are some things we just cannot, or should not, do in the limited area we are allowed. We have to remember that we don't own the space we are using. We are renting it, with several restrictions, from eBay. Like good tennants, we should follow the rules and take care of the property. eBay's published policy clearly states that we should do nothing that interferes with the upper or lower sections of the eBay pages into which our code is inserted.

Now, how can we do that and still get where we want to be? In the case of the header extension, this particular part of the eBay page is new and I haven't experimented too much with it yet, but you could try this:

<p style="background-color: #e0e0e0; color: #000000">
Thank you!!
</p>

The STYLE attribute can be used in almost any tag and allows you to put Cascading Style Sheet (CSS) information (which normally goes in the HEAD section so we can't otherwise use it on eBay) into the section we can use. Style parameters are the new and powerful way to control web pages. Some of these, too, should not be used in our sections of eBay pages but most can be.

A more elaborate way to control what you are trying to do would be with tables, like this:

<table width="100%" border="0" cellpadding="20" cellspacing="0" bgcolor="#e0e0e0">
<tr><td>

<p style="color: #000000">
Thank you!!
</p>

</td></tr>
</table>

Tables are a powerful way to take full control of the space in which you will be working. Learning how to use them is easy. Learning how to nest them properly will give you extensive functionality with layout and design.

It's always the right time to use good code.

[ back to main | back to top ]

design by wizard_mithrandir
Copyright © 2002, 2008, by Stephen B. Henry