It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Hi! Is this messy??

Hi! Is this messy??

Postby xcelnt on Tue Aug 31, 2010 11:55 am

Hi i am a uni student trying to create an index page for my folio. I have to create it in notepad and use HTML...

I have an idea in my head that i want to create but i am struggling to make it work...

I have a basic on it but i am wondering if my coding is seriously messy or is it okay..



<html>
<head>
<title>ED114 Folio: Xcelnt</title>
</head>


<body style="height:4000px;">


<body>
<embed name="19 Calming music"
src="19 calming music.m4a"
loop="false"
autostart="true"
hidden="true"
mastersound />

<h1>
<div>
<div align="center">
<table BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="750">
<CELLPADDING=3>
<table border="1">
<tr>
<td>
<TR>
<TD><a href="http://www.mysite.com/profile.php?id"><img src="xcelnt 150.jpg" border="4" style="border-color=#000080; border-style:inset" alt="Welcome to xcelnt's Folio"/></a>
<TD NOWRAP><font color=#000080><font size="5"><align ="centre"><B>Welcome to xcelntFolio</b></align ="centre"></font size="5"></font color="#000080>
</align ="centre">
<br><font color=#000080><font size="3"><align ="centre"><b>Student Number: </b></font size="3"></align ="centre"></font></td>
</TR></td>

</tr>
</table>
</TABLE>
</div>
<div>
<style type="text/css">
body{background-image:url("background.png");
background-attachment:fixed;
background-repeat:no-repeat;
background-position:center;}
table, tr, td {
background-color:transparent;
border: 0px;
padding:2;
}
</style>
</div align="center">
</h1>
<h2>
<div align="right">
<DL><pre><center>
<<dd><font size="4" face="comic sans ms">
<font color=#000080><img src="bullet.gif"><a href="my doc.docx">MY doc</a>
<img src="bullet.gif"><a href="powerpoint.pptx">Powerpoint</a></dd></DL>
</h2>
<br>
<br>
<br>
<br>
<br>
<br>
<footer>
<align="left"><font size="2"><font color=#000080>
<br>Internet Link: <a href="http://www.mysite/">Mysite</a></br>
Email Link:<a href="mailto:myemail">Keep in touch</a>!</br>
© 2010 xcelnt </font size="1">
</footer>
xcelnt
 
Posts: 1
Joined: Tue Aug 31, 2010 11:52 am

Re: Hi! Is this messy??

Postby HotNoob on Mon Sep 20, 2010 10:05 pm

it is not too messy, but it is full of errors;

I'll rewrite it to show you how i'd write it, and hopefully it will help you with finding your own HTML coding style that both you and other people can easily work with.

Error List:
1. The HTML tag is not closed; When writing tags, always write both tags first. For example, write in "<html></html>" then put your code in.
2. Your BODY tag is written in twice; their should never be more than 1 "<body>"
3. You were missing a double quote in one of the font tags. Make sure that you write both quotes, then put the content in.
4. " <CELLPADDING=3> " is not a tag.
5. your table tags have issues; The proper format is:
Code: Select all
<table>
    <tr>
        <td>
            <table>
                <tr>
                    <td>

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

6. <align> is not a tag
7. ending tags NEVER need the attributes in them.
8. footer is not a tag
9. </br> should be <br />

Tip List:
1. Try to keep your styles at the top in between the head tags. you may also think about putting your style sheets in a separate page.
2. use tabs, and lots of them.
3. keep your tags with the same case, if you are going to use CAPITALS use ONLY capitals, if you are going to use lowercase, use only lowercase. i recommend lowercase, because it is easier on the hands and easier to read.
4. keep your tags compressed.
5. keep your tags in order
6. empty tags are useless ones
7. when you use the <br /> make a line break in your code, to make it easier to read, and put the tag on the new line, so you can see them.
8. use &copy; instead of the copyright sign.

Re-written:
Code: Select all
<html>
    <head>
      <title>ED114 Folio: Xcelnt</title>
      <style type="text/css">
        body
        {
          background-image:url("background.png");
          background-attachment:fixed;
          background-repeat:no-repeat;
          background-position:center;
        }
        table, tr, td
        {
          background-color:transparent;
          border: 0px;
          padding:2;
        }
      </style>
  </head>


  <body style="height:4000px;">
    <embed name="19 Calming music"
        src="19 calming music.m4a"
        loop="false"
        autostart="true"
        hidden="true"
        mastersound />
    <h1>
    <div align="center">
      <table border="1" cellpadding="0" cellspacing="0" WIDTH="750">
        <tr>
          <td>
              <a href="http://www.mysite.com/profile.php?id">
                  <img src="xcelnt 150.jpg" border="4" style="border-color=#000080; border-style:inset" alt="Welcome to xcelnt's Folio"/>
              </a>
          </td>
          <td nowrap>
              <font color=#000080 size="5">
                  <center>
                      <B>Welcome to xcelntFolio</b>
                  </center>
              </font>
              <br />
              <font color=#000080 size="3">
                  <center>
                    <b>Student Number: </b>
                  </center>
              </font>
          </td>
        </tr>
      </table>
    </div>
    </h1>
    <h2>
      <div align="right">
        <DL>
          <pre>
            <center>
              <dd>
                <font size="4" face="comic sans ms" color=#000080>
                <img src="bullet.gif"><a href="my doc.docx">MY doc</a>
                <img src="bullet.gif"><a href="powerpoint.pptx">Powerpoint</a>
                </font>
              </dd>
            </center>
          </pre>
        </DL>
      </div>
    </h2>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <div align="left">
      <font size="2" color=#000080>
        <br />Internet Link: <a href="http://www.mysite/">Mysite</a>
        <br />Email Link: <a href="mailto:myemail">Keep in touch</a>!
        <br /> &copy; 2010 xcelnt
      </font>
    </div>
  </body>
</html>


Ps, if your writing code that badly. blame your professor, because HTML is the EASIEST coding language other than BBCode, and if he can't teach it, he FAILS at life.
HotNoob
100+ Club
 
Posts: 169
Joined: Sun May 02, 2010 1:38 am


Who is online

Users browsing this forum: No registered users and 9 guests