Solved

How to get a specific page to validate

Posted on 2013-12-04
6
300 Views
Last Modified: 2013-12-04
I'm trying to get this page to validate, but I don't understand what I'm supposed to do. It says that a LINK to various style sheets are in the wrong location, but they are in the HEAD, so that can't be the issue.

Would someone be willing to help me with these remaining errors? I've fixed all that I know how to fix.

http://sitedesyne.com/WBCA2/homepage.html

Thank you so much!
0
Comment
Question by:Elizabeth2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 250 total points
ID: 39696215
Most of them are caused by the DOCTYPE for HTML 4.01 and then trying to use modern html5 coding.

Change the doctype to

<!doctype html>

That will get rid of most of the errors, but you will probably get a few new ones for some of the obsolete attributes.

As a side note, it is really bad practice to use inline styles instead of having everthing in stylesheets.  There is a huge risk if breaking cascades during maintenance.

Cd&
0
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 total points
ID: 39696226
0
 

Author Comment

by:Elizabeth2
ID: 39696281
Well, yes. I have figured out most of them, but still have 1 that I don't know how to fix. The 5th error I had to put back in the code, so that IE 11 would display my stretched background properly. Without it, the background doesn't stretch, and that was adding width="100%" and height="100%" where the validator is only looking for the numbers and no % sign.  However, as I mentioned, without it, the page didn't display properly.

I don't know how to fix this one: Line 8, Column 109: The charset attribute... I tried with and without. Not sure what to put there.

The others I will try to fix with CSS.
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:Elizabeth2
ID: 39696294
Oh, and I forgot to answer, that I'm only using the inline styles while I'm working on the page. I have more elements to add. Once I get everything added, and working, I'll move that code to a CSS page. Thank you for mentioning that, however. ;-)
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39696338
Your problem with the image is because the spec defines the values for with and height of an images a a positive integer specifying the number of pixels.  

You should define only the width and let the browser calculate the height to avoid distortion.  if you use the percentages, you are guaranteed to have a distorted rendering under some conditions, but if you do it to the standard you will get correct rendering in the 90% of modern browsers that do it right including most mobile.

If it is a background image then set it as the background for an HTML element and then you can use 100%.

Cd&

Cd&
0
 

Author Closing Comment

by:Elizabeth2
ID: 39697003
Thank you both so much for the help! You were equally helpful. I really appreciate the quick responses ;-)
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question