<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

to


<!DOCTYPE HTML>

 

Head

  • <meta http-equiv=”Content-Language” content=”en”>      <html lang=”en”>
  • <body background=”bgimg.png”>   
      <style>body {background-image:url('bgimg.png'); margin-top:0px;}</style>
    </head>
    <body>

Text

Text size:

Exact mappings of size      font-size depend on context, e.g.:

  • <font size=”-1″>      <p style=”font-size:85%; margin:0;”>
  • <font size=”2″>      <p style=”font-size:65%; margin:0;”>

Centering text:

  • <center>text      <p style=”text-align:center; margin:0;”>text
  • <h1 style=”text-align:center;”>

Images

  • <center><img…      <img style=”display:block; margin-left:auto; margin-right:auto;”>
  • <img style=”border:none;”> == <img style=”border:0;”> ? Same for iframe, table
  • <img align=”left”      <img style=”float:left;”

Anchors

  • put id=”title” in the nearest tag, or
  • <a name=”title”></a>      <div id=”title”></div>

Tables

Table alignment:

  • <center><table…      <table style=”margin:0 auto;”>
  • Right-align table: <table style=”float:right;”>

Table rows and cells:

  • <tr align=”center”>      <tr style=”text-align:center;”>
  • <td width=”5%”>      <td style=”width:5%;”>
  • <td valign=”top”>      <td style=”vertical-align:top;”>
    • or top      text-top

Table padding and spacing:

  • cellpadding=”0″      style=”padding:0;” # in td, th
  • cellspacing=”5″      style=”border-collapse:separate; border-spacing:5px;” # in table
  • cellspacing=”0″      style=”border-collapse:collapse; border-spacing:0;” # in table

Cetera tabularum:

  • background colour: background-color:#DDDDDD;
  • remove table summaries

Lists

  • <ul style=”line-height:2em; margin-top:-0.7em;”>

iFrames

  • scrolling=”no”      style=”overflow:hidden;”
  • frameborder=”0″      style=”border:none;”
  • allowTransparency=”true”      leave out; default bg colour

Cetera

  • remove language=”JavaScript” from <script>