Does the following HTML code look correct and what is the purpose of the # sign in the STYLE?

<HTML>
<head>
<style>
#ABC_frmReconciliationMenu{
z-index:-1;
}
</style>
<script language="JavaScript" type="text/javascript"
src="$ApplicationRootDir/appls/CTRL/resources/GeneralScript1.js"> </script>
<script language="JavaScript" type="text/javascript"
src="$ApplicationRootDir/appls/CTRL/resources/GeneralScript2.js">
</script>
<script language="JavaScript" type="text/javascript"
src="$ApplicationRootDir/appls/CTRL/resources/AutoSkip.js">
</script>
</head>
<body bgcolor="ButtonFace"; onload="General_Onload();General2_Onload();" onkeyup="autoSkip();">
</body>
</HTML>
zimmer9Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
The # indicates the ID of an element to target with the specified style.

And no, your html does not conform to standards.  Please check it using the W3 Validator: https://validator.w3.org/#validate_by_input

Copy and paste your code into that and click validate.  4 errors and 4 warnings

Validation Output: 4 Errors

Error Line 1, Column 1: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>"
<HTML>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with a fallback DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.

Error Line 3, Column 7: required attribute "TYPE" not specified
<style>

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

Error Line 16, Column 7: end tag for "HEAD" which is not finished
</head>

Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on.

Error Line 17, Column 27: character ";" not allowed in attribute specification list
<body bgcolor="ButtonFace"; onload="General_Onload();General2_Onload();" onkeyu…

Open in new window

RobOwner (Aidellio)Commented:
This is how it should look:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<style type="text/css">
#ABC_frmReconciliationMenu{
z-index:-1;
}
</style>

<script language="JavaScript" type="text/javascript" src="$ApplicationRootDir/appls/CTRL/resources/GeneralScript1.js">
</script>
<script language="JavaScript" type="text/javascript" src="$ApplicationRootDir/appls/CTRL/resources/GeneralScript2.js">
</script>
<script language="JavaScript" type="text/javascript" src="$ApplicationRootDir/appls/CTRL/resources/AutoSkip.js">
</script>
<title></title>
</head>
<body class="ButtonFace" onload="General_Onload();General2_Onload();" onkeyup="autoSkip();">
</body>
</html>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.