Jump to content

Error In Code?


Recommended Posts

<?xml version= "1.0" encoding= "UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html><head>

<link rel= "stylesheet" href= "stylesheets/style.css"

type= "text/css"

/>

<title>Save a Pet</title>

</head>

<meta name= "description" content="Save a Pet" />

<meta name= "keywords" content="Adopt Pets Shelter Rescues" />

<body class= "gradient">

<h1 align= "center" class= "blueshadow"><font color= "red" size= "8" face= "Comic Sans MS">Save a Pet</h1></font><br />Hello.<br /> Did you know that by adopting animals from shelters/rescues, millions of lives are saved? Go to a local shelter/rescue and maybe... you'll find the perfect pet! The animals in shelters and rescues are mostly either animals that were left to die by their old owners or their owners really did care about them and they just could't afford to take care of them anymore.<br /><h2 align= "center">They need your help!</h2><br />If you're looking for a pet, you should first take a look at your local shelter or rescue, because these poor animals need someone to love them and care for them. Remember, most of these animals were either abused or mistreated by their original owners, or they were sent there because the owners couldn't take care of them anymore. Not many people realize this, but most dogs at pet stores are from puppy mills. Puppy mills are where people leave dogs in their cages basically their entire life and make them reproduce until they can't reproduce anymore; after that, they just get rid of them. It's terrible what happens to these poor animals! They do this with cats and other animals too. After they force them to reproduce, they sell their offspring for money. That's the whole point of the business... money. That's just a couple reasons why you should think twice before getting a dog from a <i>pet store.</i> You should also think twice before getting a cat <i>or</i> a dog from a <i>breeder.</i> For example: I want a French Bulldog, but I'm not going to look for one at a pet store... I'm going to look for one at a rescue or shelter because even purebreeds need homes. If you are interested in adopting or fostering an animal, click on this link <a href= "http://www.petfinder.com"> Pet Finder<a/>

<p><a href= "websitepages.html">Shelters in NJ</a> This link goes to a page that lists just a few of the many animal shelters and rescues in New Jersey.</p>

<table border= "1" bordercolor= "black">

<tr>

<td><img src= "images/shelterdog1.jpg" width= "200px"></td>

<td><img src= "images/shelterdog2.jpg" width= "200px"</td>

<td><img src= "images/sheltercat.jpg" width= "200px"</td>

<td><img src= "images/shelterdog3.jpg" width= "200px"</td>

<td><img src= "images/sheltercat1.jpg" width= "125px"</td>

<td><img src= "images/shelterdog4.jpg" width= "150px"</td>

</tr>

 

</table>

</td>

</body>

</html>

Is something wrong with this code?

Link to comment
Share on other sites

I honestly don't know. The other day, when I tried to view my website using ftp, it told me there was an error in my code. So, I then attempted to fix this problem with the code, although the error message was a bit confusing. And I'm still waiting for my website to be put on the Internet.

Link to comment
Share on other sites

Aside from the very outdated HTML (<font> tags are obsolete, use CSS for fonts), some code comments I have after a very quick look are these:

 

<h1 align= "center" class= "blueshadow"><font color= "red" size= "8" face= "Comic Sans MS">Save a Pet</h1></font>

You opened the <h1> first, but closed the <font> last. The first thing opened should be the last thing closed. Move the </font> inside of the </h1> so the header is closed last.

 

<a/>

Typo for the closing tag on your pet finder link.

 

<td><img src= "images/shelterdog3.jpg" width= "200px"</td>

 

The closing > is missing on your <img> tags for all of the images in that table.

Link to comment
Share on other sites

<?xml version= "1.0" encoding= "UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html><head>

<link rel= "stylesheet" href= "stylesheets/style.css"

type= "text/css"

/>

<title>Save a Pet</title>

</head>

<meta name= "description" content="Save a Pet" />

<meta name= "keywords" content="Adopt Pets Shelter Rescues" />

<body class= "gradient">

<h1 align= "center" class= "blueshadow"><font color= "red" size= "8" face= "Comic Sans MS">Save a Pet</font>t<br />Hello.<br /> Did you know that by adopting animals from shelters/rescues, millions of lives are saved? Go to a local shelter/rescue and maybe... you'll find the perfect pet! The animals in shelters and rescues are mostly either animals that were left to die by their old owners or their owners really did care about them and they just could't afford to take care of them anymore.<br /><h2 align= "center">They need your help!</h2><br />If you're looking for a pet, you should first take a look at your local shelter or rescue, because these poor animals need someone to love them and care for them. Remember, most of these animals were either abused or mistreated by their original owners, or they were sent there because the owners couldn't take care of them anymore. Not many people realize this, but most dogs at pet stores are from puppy mills. Puppy mills are where people leave dogs in their cages basically their entire life and make them reproduce until they can't reproduce anymore; after that, they just get rid of them. It's terrible what happens to these poor animals! They do this with cats and other animals too. After they force them to reproduce, they sell their offspring for money. That's the whole point of the business... money. That's just a couple reasons why you should think twice before getting a dog from a <i>pet store.</i> You should also think twice before getting a cat <i>or</i> a dog from a <i>breeder.</i> For example: I want a French Bulldog, but I'm not going to look for one at a pet store... I'm going to look for one at a rescue or shelter because even purebreeds need homes. If you are interested in adopting or fostering an animal, click on this link <a href= "http://www.petfinder.com"> Pet Finder</a>

<p><a href= "websitepages.html">Shelters in NJ</a> This link goes to a page that lists just a few of the many animal shelters and rescues in New Jersey.</p>

<table border= "1" bordercolor= "black">

<tr>

<td><img src= "images/shelterdog1.jpg" width= "200px"></td>

<td><img src= "images/shelterdog2.jpg" width= "200px"></td>

<td><img src= "images/sheltercat.jpg" width= "200px"></td>

<td><img src= "images/shelterdog3.jpg" width= "200px"></td>

<td><img src= "images/sheltercat1.jpg" width= "125px"></td>

<td><img src= "images/shelterdog4.jpg" width= "150px"></td>

</tr>

 

</table>

</td>

</body>

</html>

Link to comment
Share on other sites

Use CSS instead of Font elements :)/> . CSS is very easy to use and also very helpful. Also use alt in img tags to make it more useful, if the images are broken or not available or are loading.

I'm really sorry for wasting your time, but how exactly do you do that?

 

I mean, I used a book called "Go Berserk Making a Website Using HTML and CSS" (or at least I think that's what it's called), to make a website, but they used the <font> </font> tags... I'm really lost right now. I'm also very new to making websites.

 

/Oops, nevermind about the alt, i remember how to do that. But whats the other part of what you said?

Link to comment
Share on other sites

CSS is another language used for describing the appearance of elements on a website. It sounds like your book should cover it. Font tags are commonly used in books for beginners because they are easy to understand and eliminate the complexity associated with CSS.

 

They technically shouldn't be used anymore on published sites because they are from an older HTML standard, but that's not to say they won't work, as all major browsers still understand them. Since you're a beginner, you might just want to keep the font tags for now.

Link to comment
Share on other sites

Is there a way to know if my website is on the web yet? Can you tell me please? :( It has been quite a while now.

 

When ever I type in some of my pages of my website in the URL code (I do put the full web address in), it just shows the code.

Link to comment
Share on other sites

Is there a way to know if my website is on the web yet? Can you tell me please? :(/> It has been quite a while now. When ever I type in some of my pages of my website in the URL code (I do put the full web address in), it just shows the code.

What is your website's address?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...