Graeme Posted May 4, 2012 Report Share Posted May 4, 2012 Hello All, I just validated a site and a couple of errors showed up that I don't quite understand Line 7, Column 12: there is no attribute "name" <META name="description" content="Welcome to 2b-fit. A site designed to give y… Line 7, Column 323: element "META" undefined … you can enjoy our training that will suit every taste and level of fitness" />I wondered if any of the boys and girls could explain? Thank you as always, Best wishes Graeme Quote Link to comment Share on other sites More sharing options...
Andrea Posted May 4, 2012 Report Share Posted May 4, 2012 You might want to copy and paste your entire head section - including the doctype. Quote Link to comment Share on other sites More sharing options...
Graeme Posted May 4, 2012 Author Report Share Posted May 4, 2012 Thanks Andrea, Here it is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>2B-Fit | Circuit Training | Tone Up | Bootcamp</title> <META name="description" content="Welcome to 2b-fit. A site designed to give you an insight into our Circuit Training and a great way to keep fit, lose weight, tone up, feel great, meet people and most importantly have fun. Whatever your level you can enjoy our training that will suit every taste and level of fitness" /> <META name="Keywords" content="2b-fit, Circuit Training, boot camp, keep fit, tone up, fitness, Chester-le-Street, Trainer" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="styles/lightbox.css" type="text/css" media="screen" /> Thank you, Best wishes Graeme Quote Link to comment Share on other sites More sharing options...
Wickham Posted May 4, 2012 Report Share Posted May 4, 2012 You're using an XHTML doctype which requires lower case for element and attribute names, including meta tags. I've just tested one of my files with META which gave three errors inluding the one you describe, but when I reverted to meta that I had before, I got no errors. Quote Link to comment Share on other sites More sharing options...
Graeme Posted May 4, 2012 Author Report Share Posted May 4, 2012 Thank you so much, So always use lowercase 'meta'? Is that with everything in this DocType? Best wishes Graeme Quote Link to comment Share on other sites More sharing options...
Wickham Posted May 4, 2012 Report Share Posted May 4, 2012 id names, class names, meta tags, title tags CSS like these:- body { color: red; } #wrap { } .left { } HTML markup:- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="Memoirs" /> <title>My Memoirs</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style2.css" media="all" type="text/css" /> <style type="text/css">...........</style> </head> <body> .................content...... </body> </html> It isn't necessary for the doctype which can be lower case. It's advisable to code filenames and extensions in lower case like index.html or picture.jpg as mixing lower case and upper case can cause a problem if the case is different in the html markup from the actual filename as most hosting services are case sensitive (although IE locally isn't). Quote Link to comment Share on other sites More sharing options...
benjaminmorgan Posted May 4, 2012 Report Share Posted May 4, 2012 I'm pretty sure it's best practice to keep all tags lowercase. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.