Copy link to clipboard
Copied
this is my first attempt at a web page so maybe I am missing something. ive checked over and over again..
I'm getting the error message,
"tag must be paired, missing [</div> </div> </div> </div>] start tag match failed [<div>] on line 38
line 38 is <div><div id="content">
am I missing something????
<!doctype html>
<html>
<head>
<link href="css/styles.css">
</head>
<body><div>
<div id="banner"> <img src="images/LDR banner.jpg">
</div>
<div>
<div id="header">
<h1>Highly Addictive Content</h1>
</div>
<div>
<div id= "navigate">
<ul>
<il><a href="index.html">Home</a></il>
<il><a href="lease.html">Lease</a></il>
<il><a href="exclusive.html">Exclusive</a></il>
<il><a href="mailinglist.html">Mailing List</a></il>
<il><a href="contactus.html">Contact Us</a></il>
</ul>
</div>
<div><div id= "content">
<p>Shop for high quality beats for lease. </p>
<p>Various Styles and sounds to add mixed flavor to any project from original hip hop to trap music. </p>
<p>Get exclusive beats made upon request and worked on to your satisfaction. </p>
<p>Join our mailing list for promos and updates.</p>
<img src="images/ldr logo 2 web.png"></div>
</body>
</html>
To code for an HTML page you must have a working knowledge of HTML.
One of the first things one learns when being taught to code, is that most (and not all) elements in HTML require an opening tag and a corresponding closing tag. In other words, when you have a <div> tag you must also have a </div> tag to complete the element.
Look through your document, count the <div> tags and the </div> tags and you will see a discrepancy of at least three.
Copy link to clipboard
Copied
To code for an HTML page you must have a working knowledge of HTML.
One of the first things one learns when being taught to code, is that most (and not all) elements in HTML require an opening tag and a corresponding closing tag. In other words, when you have a <div> tag you must also have a </div> tag to complete the element.
Look through your document, count the <div> tags and the </div> tags and you will see a discrepancy of at least three.
Copy link to clipboard
Copied
how would one count the tags when the html page is long? Sorry for the noob question.
Copy link to clipboard
Copied
You don't count tags. The page needs to be structured so that it is obvious if a tag is missing.
This is part of @Nancy OShea's answer
This uses semantic sectioning elements to give the page a structure.
For more, see one of my videos:
https://youtu.be/Zy4yJz1icrw?si=mpumfkLqKFZm3lPb
Copy link to clipboard
Copied
Ben answered your question. I just have a point of advice:
Do not use spaces in file names, even if it works:
<div id="banner"> <img src="images/LDR banner.jpg">
<img src="images/ldr logo 2 web.png"></div>
Have a set of rules for naming files, form fields, and variables. My rules are:
Copy link to clipboard
Copied
Learn to use HTML5 semantic tags.
These tags will cut down on the Divs and give more meaning to your content which is good for search engines and web accessibility.
CSS tips:
Avoid using unique #IDs unless you need to specifically target them for an action.
Most of the time a semantic tag will get the job done -- header, nav, li, etc...
And the rest of the time a re-usable .class_name is all that's needed.
Nancy
Copy link to clipboard
Copied
Wow, I did not notice the necro thread. Forget what I wrote. 🙂
Find more inspiration, events, and resources on the new Adobe Community
Explore Now