Forums
This topic is locked
How do I close: tag that was left unclosed.
Posted 15 Jun 2007 09:27:42
1
has voted
15 Jun 2007 09:27:42 Kylie Jensen posted:
HiCan someone help me....
How do I close:
Line 31 Col 105 : Closed a <img> tag that was left unclosed.
Line 62 Col 122 : Closed a <img> tag that was left unclosed.
Line 69 Col 31 : Closed a <br> tag that was left unclosed.
Line 70 Col 76 : Closed a <input> tag that was left unclosed.
Line 72 Col 17 : Closed a <br> tag that was left unclosed.
Line 73 Col 18 : Closed a <br> tag that was left unclosed.
Line 74 Col 75 : Closed a <input> tag that was left unclosed.
Line 78 Col 10 : Closed a <br> tag that was left unclosed.
Line 128 Col 14 : Closed a <br> tag that was left unclosed.
Line 130 Col 12 : Closed a <br> tag that was left unclosed.
Line 132 Col 25 : Closed a <br> tag that was left unclosed.
Line 137 Col 131 : Closed a <img> tag that was left unclosed.
Line 137 Col 135 : Closed a <br> tag that was left unclosed.
Im new to learning code.
Replies
Replied 15 Jun 2007 09:49:16
15 Jun 2007 09:49:16 Alan C replied:
each of your tags needs to be closed when you're using xhtml, but . . . the browsers will do it for you if you forget, there is some opinion that says that the browsers ought not to do it, but then there would be lots of pages that didn't work. IMHO it's time for the browsers to stop being so kind.
Looking at your list, those are all tags that have just one part, take the <pre id=code><font face=courier size=2 id=code> <br></font id=code></pre id=code> tag, it only has one part, it's not like <pre id=code><font face=courier size=2 id=code> <p> some text </p></font id=code></pre id=code> that has an opening and closing part. So, the answer is that you close these tags in a different way, for break it's <pre id=code><font face=courier size=2 id=code> <br /></font id=code></pre id=code>
That's a space followed by the /
The others are similar
Looking at your list, those are all tags that have just one part, take the <pre id=code><font face=courier size=2 id=code> <br></font id=code></pre id=code> tag, it only has one part, it's not like <pre id=code><font face=courier size=2 id=code> <p> some text </p></font id=code></pre id=code> that has an opening and closing part. So, the answer is that you close these tags in a different way, for break it's <pre id=code><font face=courier size=2 id=code> <br /></font id=code></pre id=code>
That's a space followed by the /
The others are similar
Replied 15 Jun 2007 10:50:44
15 Jun 2007 10:50:44 Kylie Jensen replied:
Can you look at my code and give me a before and after example for a couple of examples please? Thanks Heaps
website is www.development.acnm.edu.au/latest/home_page.html
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Australian College of Natural Medicine</title>
<style type="text/css">
@import url(layout.css);
</style>
<style type="text/css">
@import url(menu.css);@import url("styles.css"
.style1 {color: #666666}
.semester {
font-size: 11px;
font-family: Arial, Helvetica, sans-serif;
color: #60721E;
}
</style>
<script type="text/javascript" language="javascript" src="menu.js"></script>
<link href="/index.html/styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape"&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<div id="header_two">
<div id="top_image"><img src="images/new pictures/top_leaf.jpg" alt="top_leaf" width="980" height="10" /></div>
<div id="menu">
<ul class="menulist" id="listMenuRoot">
<li><a href="home_page.html">Home</a></li>
<li><a href="courses.html">Courses</a>
<ul>
<li><a href="acupuncture.html">Acupuncture</a></li>
<li><a href="aromatherapy.html">Aromatherapy</a></li>
<li><a href="homeopathy.html">Homeopathy</a></li>
<li><a href="counselling.html">Holistic Counselling</a></li>
<li><a href="massage.html">Massage Therapy</a></li>
<li><a href="nutritional.html">Nutritional Medicine</a></li>
<li><a href="beautytherapy.html">Natural Beauty Therapy</a></li>
<li><a href="mindbody.html">Mind/Body Medicine</a></li>
<li><a href="musculoskeletal.html">Musculoskeletal Therapy</a></li>
<li><a href="naturopathy.html">Naturopathy</a></li>
<li><a href="remedial.html">Remedial Massage</a></li>
<li><a href="reflexology.html">Reflexology</a></li>
<li><a href="tcmremedial.html">T.C.M. Remedial Massage</a></li>
<li><a href="westernherbal.html">Western Herbal Medicine</a></li>
</ul>
</li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="newstudents.html">New Students</a></li>
<li><a href="current.html">Current</a></li>
<li><a href="international.html">International</a></li>
<li><a href="alumni.html">Alumni</a></li>
<li><a href="clinic.html">Clinic</a></li>
<li><a href="beauty.html">Beauty</a></li>
</ul>
</div>
<div id="banner"><img name="front_image" src="images/new pictures/front-header-pic.jpg" width="980" height="160" alt="" /></div>
<div id="slogan">The Centre of Excellence in Natural Medicine Education for more than 30 years </div>
</div>
<div id="acnm_content_two">
<div id="login">
<h1>ACNM Student Login</h1>
<form name="form1" method="post" action="">
<label>Student Number<br />
<input name="acnm_student_number" type="text" size="12" maxlength="6" />
</label>
<label><br />
Password<br />
<input name="acnm_password" type="password" size="12" maxlength="12" />
</label>
<label></label>
<label></label>
<br />
<input type="submit" name="login" value="login" class="login" />
</form>
</div>
<div id="courseinfoseminars">
<p><b>Brisbane</b><br />
28 May, 2:00pm</p>
<p><b>Gold Coast</b><br />
31 May, 6:30pm</p>
<p><b>Melbourne</b><br />
28 May, 2:00pm</p>
<p><b>Box Hill</b><br />
31 May, 6:30pm</p>
<p><b>Perth</b><br />
28 May, 2:00pm</p>
</div>
<div id="middle">
<h2>There has never been a better time to study
Natural Medicine </h2>
<p>ACNM is committed to the future of natural medicine in this
country and internationally. The highest standard of education
and the most informed curriculum ensures that ACNM graduates
become highly-regarded practitioners.The Australian College of
Natural Medicine was the first institution in Australia, private or
public, to offer such a range of natural medicine courses from
Certificate through to Bachelor level programs.</p>
<p> </p>
<h2>The Spirit of ACNM</h2>
<p>The reasons why people turn to natural medicine are many.
To some, natural medicine represents a natural and gentle
approach to achieving a positive health outcome, one that doesn’t
include invasive, aggressive or harmful treatments.
To others, the appeal of natural medicine is that it acknowledges
more than just the physical aspect of illness. For most, however, the
appeal of the natural medicine approach is based on the fact that it
has ‘soul’, something that is largely missing from the conventional
medicine model.</p>
</div>
<div id="right">
<h2>Important News</h2>
<h2><strong>FEE-HELP</strong></h2>
<p> FEE-HELP now available for ACNM students</p>
<h2><strong>FEE-HELP</strong></h2>
<p> FEE-HELP now available for ACNM students</p>
<h2><strong>FEE-HELP</strong></h2>
<p> FEE-HELP now available for ACNM students
</p>
</div>
<div id="right_cnb">
<p><a href="beauty_therapy_home.html">CLICK HERE</a> to find
out <br />
what's on offer
at<br />
The College of
Natural Beauty <br />
Brisbane Campus</p>
</div>
</div>
<div id="footer">
<p><img src="images/new pictures/bottom-leaf2.jpg" alt="bottom_leaf" name="bottom_leaf" width="980" height="22" id="bottom_leaf" /><br/>
© Australian College of Natural Medicine 2007, Australia.
Registered Training Organisation #31489. CRICOS Provider # <a href="cricos.dest.gov.au/Institution/InstitutionDetails.aspx?ProviderID=231" target="_blank">QLD 00231G</a> | <a href="cricos.dest.gov.au/Institution/InstitutionDetails.aspx?ProviderID=1399" target="_blank">VIC 01534F</a> | <a href="cricos.dest.gov.au/Institution/InstitutionDetails.aspx?ProviderID=2492" target="_blank">WA 02492C</a> <br />
Home | Courses | About Us | New Students | Current Students| International Students| Alumni | Public Clinic | Enrol | Contact Us | Disclaimer | Privacy Policy</p>
</div>
</body>
</html>
website is www.development.acnm.edu.au/latest/home_page.html
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Australian College of Natural Medicine</title>
<style type="text/css">
@import url(layout.css);
</style>
<style type="text/css">
@import url(menu.css);@import url("styles.css"
.style1 {color: #666666}
.semester {
font-size: 11px;
font-family: Arial, Helvetica, sans-serif;
color: #60721E;
}
</style>
<script type="text/javascript" language="javascript" src="menu.js"></script>
<link href="/index.html/styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape"&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<div id="header_two">
<div id="top_image"><img src="images/new pictures/top_leaf.jpg" alt="top_leaf" width="980" height="10" /></div>
<div id="menu">
<ul class="menulist" id="listMenuRoot">
<li><a href="home_page.html">Home</a></li>
<li><a href="courses.html">Courses</a>
<ul>
<li><a href="acupuncture.html">Acupuncture</a></li>
<li><a href="aromatherapy.html">Aromatherapy</a></li>
<li><a href="homeopathy.html">Homeopathy</a></li>
<li><a href="counselling.html">Holistic Counselling</a></li>
<li><a href="massage.html">Massage Therapy</a></li>
<li><a href="nutritional.html">Nutritional Medicine</a></li>
<li><a href="beautytherapy.html">Natural Beauty Therapy</a></li>
<li><a href="mindbody.html">Mind/Body Medicine</a></li>
<li><a href="musculoskeletal.html">Musculoskeletal Therapy</a></li>
<li><a href="naturopathy.html">Naturopathy</a></li>
<li><a href="remedial.html">Remedial Massage</a></li>
<li><a href="reflexology.html">Reflexology</a></li>
<li><a href="tcmremedial.html">T.C.M. Remedial Massage</a></li>
<li><a href="westernherbal.html">Western Herbal Medicine</a></li>
</ul>
</li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="newstudents.html">New Students</a></li>
<li><a href="current.html">Current</a></li>
<li><a href="international.html">International</a></li>
<li><a href="alumni.html">Alumni</a></li>
<li><a href="clinic.html">Clinic</a></li>
<li><a href="beauty.html">Beauty</a></li>
</ul>
</div>
<div id="banner"><img name="front_image" src="images/new pictures/front-header-pic.jpg" width="980" height="160" alt="" /></div>
<div id="slogan">The Centre of Excellence in Natural Medicine Education for more than 30 years </div>
</div>
<div id="acnm_content_two">
<div id="login">
<h1>ACNM Student Login</h1>
<form name="form1" method="post" action="">
<label>Student Number<br />
<input name="acnm_student_number" type="text" size="12" maxlength="6" />
</label>
<label><br />
Password<br />
<input name="acnm_password" type="password" size="12" maxlength="12" />
</label>
<label></label>
<label></label>
<br />
<input type="submit" name="login" value="login" class="login" />
</form>
</div>
<div id="courseinfoseminars">
<p><b>Brisbane</b><br />
28 May, 2:00pm</p>
<p><b>Gold Coast</b><br />
31 May, 6:30pm</p>
<p><b>Melbourne</b><br />
28 May, 2:00pm</p>
<p><b>Box Hill</b><br />
31 May, 6:30pm</p>
<p><b>Perth</b><br />
28 May, 2:00pm</p>
</div>
<div id="middle">
<h2>There has never been a better time to study
Natural Medicine </h2>
<p>ACNM is committed to the future of natural medicine in this
country and internationally. The highest standard of education
and the most informed curriculum ensures that ACNM graduates
become highly-regarded practitioners.The Australian College of
Natural Medicine was the first institution in Australia, private or
public, to offer such a range of natural medicine courses from
Certificate through to Bachelor level programs.</p>
<p> </p>
<h2>The Spirit of ACNM</h2>
<p>The reasons why people turn to natural medicine are many.
To some, natural medicine represents a natural and gentle
approach to achieving a positive health outcome, one that doesn’t
include invasive, aggressive or harmful treatments.
To others, the appeal of natural medicine is that it acknowledges
more than just the physical aspect of illness. For most, however, the
appeal of the natural medicine approach is based on the fact that it
has ‘soul’, something that is largely missing from the conventional
medicine model.</p>
</div>
<div id="right">
<h2>Important News</h2>
<h2><strong>FEE-HELP</strong></h2>
<p> FEE-HELP now available for ACNM students</p>
<h2><strong>FEE-HELP</strong></h2>
<p> FEE-HELP now available for ACNM students</p>
<h2><strong>FEE-HELP</strong></h2>
<p> FEE-HELP now available for ACNM students
</p>
</div>
<div id="right_cnb">
<p><a href="beauty_therapy_home.html">CLICK HERE</a> to find
out <br />
what's on offer
at<br />
The College of
Natural Beauty <br />
Brisbane Campus</p>
</div>
</div>
<div id="footer">
<p><img src="images/new pictures/bottom-leaf2.jpg" alt="bottom_leaf" name="bottom_leaf" width="980" height="22" id="bottom_leaf" /><br/>
© Australian College of Natural Medicine 2007, Australia.
Registered Training Organisation #31489. CRICOS Provider # <a href="cricos.dest.gov.au/Institution/InstitutionDetails.aspx?ProviderID=231" target="_blank">QLD 00231G</a> | <a href="cricos.dest.gov.au/Institution/InstitutionDetails.aspx?ProviderID=1399" target="_blank">VIC 01534F</a> | <a href="cricos.dest.gov.au/Institution/InstitutionDetails.aspx?ProviderID=2492" target="_blank">WA 02492C</a> <br />
Home | Courses | About Us | New Students | Current Students| International Students| Alumni | Public Clinic | Enrol | Contact Us | Disclaimer | Privacy Policy</p>
</div>
</body>
</html>
Replied 20 Jun 2007 22:12:50
20 Jun 2007 22:12:50 Alan C replied:
Hi,
aah , I was looking at your other post earlier, the one about the page looking different in browsers - looked at in Opera, FF and IE7 yes there are differences but I couldn't see why, but now I understand - there are lots of unclosed tags that are throwing the browsers off.
Can I suggest that you get FF and install the developer's toolbar, then you can look at the code with view source and all the errors will be shown and you can tell it to clean up the code for you.
here are a couple of examples . . .
there is no document type at the top - so the browser doesn't know how to parse the file correctly and has to guess, try putting <pre id=code><font face=courier size=2 id=code> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"></font id=code></pre id=code> at the top
immediately after that you need <pre id=code><font face=courier size=2 id=code> <html></font id=code></pre id=code> you have the corresponding <pre id=code><font face=courier size=2 id=code></html></font id=code></pre id=code> at the end of the file though
I looked at the rest and it looks like the tags are now closed fine, there is a footer that looks a bit odd and stays in position while the rest of the page scrolls, that happens with the original code and the cleaned code.
Another thing you can try is pushing it through the W3C validator -
validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.development.acnm.edu.au%2Flatest%2Fhome_page.html
that will show you what errors are present and give suggestions for getting rid of them, also try the css validator at
jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2Fwww.development.acnm.edu.au%2Flatest%2Fhome_page.html
hope that helps
aah , I was looking at your other post earlier, the one about the page looking different in browsers - looked at in Opera, FF and IE7 yes there are differences but I couldn't see why, but now I understand - there are lots of unclosed tags that are throwing the browsers off.
Can I suggest that you get FF and install the developer's toolbar, then you can look at the code with view source and all the errors will be shown and you can tell it to clean up the code for you.
here are a couple of examples . . .
there is no document type at the top - so the browser doesn't know how to parse the file correctly and has to guess, try putting <pre id=code><font face=courier size=2 id=code> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"></font id=code></pre id=code> at the top
immediately after that you need <pre id=code><font face=courier size=2 id=code> <html></font id=code></pre id=code> you have the corresponding <pre id=code><font face=courier size=2 id=code></html></font id=code></pre id=code> at the end of the file though
I looked at the rest and it looks like the tags are now closed fine, there is a footer that looks a bit odd and stays in position while the rest of the page scrolls, that happens with the original code and the cleaned code.
Another thing you can try is pushing it through the W3C validator -
validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.development.acnm.edu.au%2Flatest%2Fhome_page.html
that will show you what errors are present and give suggestions for getting rid of them, also try the css validator at
jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2Fwww.development.acnm.edu.au%2Flatest%2Fhome_page.html
hope that helps
Replied 21 Jun 2007 02:15:59
21 Jun 2007 02:15:59 Kylie Jensen replied:
Hi
I ended up putting that little bit of code back (doctype) in at the very top of the page before you suggested it as I saw somewhere else suggesting that all websites should have it. I find though that the margins of my divs didnt turn out well in the differnet browsers, but somehow I think its ok now. I especially found it hard when you put borders on tables. They showed up completly different in all the different browsers so now Im trying to just use cell spacing.
I dont know coding at all, so to make sure a piece of code is closed I dont know what to do.
Also I did try puting it through that validator but not sure what it does or what to do with it.
By the way the footer is not meant to scroll.
Thanks for replying. All this is a bit tricky.
I ended up putting that little bit of code back (doctype) in at the very top of the page before you suggested it as I saw somewhere else suggesting that all websites should have it. I find though that the margins of my divs didnt turn out well in the differnet browsers, but somehow I think its ok now. I especially found it hard when you put borders on tables. They showed up completly different in all the different browsers so now Im trying to just use cell spacing.
I dont know coding at all, so to make sure a piece of code is closed I dont know what to do.
Also I did try puting it through that validator but not sure what it does or what to do with it.
By the way the footer is not meant to scroll.
Thanks for replying. All this is a bit tricky.
Replied 21 Jun 2007 15:19:17
21 Jun 2007 15:19:17 Alan C replied:
HI
I think CSS has made life more difficult for newcomers to web design, because it introduces a new level of things you have to learn about before you can really start getting pages to look right. It does produce better pages but there is a price to pay - like you say, it's not easy to get going.
The tags business is not too bad, you have to close tags and do it in the right order, so if you want something bold and italic you might open the bold tag, then open the italic tag, when you close them you have to do it in the right order, so you would close the italic first, then the bold. When you're programming most of the languages can tell you that you've done something wrong and give you some indication of where it is in the line, but when it comes to the browsers there's not really a lot that they tell you. So they just don't do what you expect. That really makes life hard because you don't know where to look when things don't do what you expect.
Don't give up on it though, I struggle with a lot of things and have to work around them until eventually I get the thing to work how I want it. What my customers and others don't see is the hours I spend trying to get it right <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
I think CSS has made life more difficult for newcomers to web design, because it introduces a new level of things you have to learn about before you can really start getting pages to look right. It does produce better pages but there is a price to pay - like you say, it's not easy to get going.
The tags business is not too bad, you have to close tags and do it in the right order, so if you want something bold and italic you might open the bold tag, then open the italic tag, when you close them you have to do it in the right order, so you would close the italic first, then the bold. When you're programming most of the languages can tell you that you've done something wrong and give you some indication of where it is in the line, but when it comes to the browsers there's not really a lot that they tell you. So they just don't do what you expect. That really makes life hard because you don't know where to look when things don't do what you expect.
Don't give up on it though, I struggle with a lot of things and have to work around them until eventually I get the thing to work how I want it. What my customers and others don't see is the hours I spend trying to get it right <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 22 Jun 2007 02:32:08
22 Jun 2007 02:32:08 Kylie Jensen replied:
Thankyou... yes its a bit of trial and error.
I appreciate the help and advce.
I appreciate the help and advce.
Replied 29 Jun 2007 10:49:04
29 Jun 2007 10:49:04 alin canbas replied:
you dont have to close tags like <br> or <p>... dont worry <img src=../images/fwzone/forum/icon_smile.gif border=0 align=middle>
www.findindirectory.com/fallin.aspx?pr=Computers/Internet/Web_Design_and_Development/
www.findindirectory.com/fallin.aspx?pr=Computers/Internet/Web_Design_and_Development/