CSS formating is giving me an error when I try to validate the file

Line 8, Column 7: end tag for "STYLE" omitted, but its declaration does not permit this ✉ •You forgot to close a tag, or •you used something inside this tag that was not allowed, and the validator is complaining that the tag should be closed before such content can be allowed. The next message, "start tag was here" points to the particular instance of the tag in question); the positional indicator points to where the validator expected you to close the tag. Line 7, Column 1: start tag was here

<html>
<head>
<title>Randy's first html web page !</title>
<style type="text/css">
</head>
body
h1
{
background-color:#6495aa;
margin-right:1350px;
}
h2
{
background-color:#b0c4de;
margin-right:1350px;
}
p
{
background-color:#649fff;
margin-right:1350px;
}
div
{
background-color:#efffff;
}
</style>

Answers


You closed your head before your style, so the validator sees it as you've already finished with <style>, and take it that you forgot to close it before </head>, try:

    <html>
<head>
<title>Randy's first html web page !</title>
<style type="text/css">
body
h1
{
background-color:#6495aa;
margin-right:1350px;
}
h2
{
background-color:#b0c4de;
margin-right:1350px;
}
p
{
background-color:#649fff;
margin-right:1350px;
}
div
{
background-color:#efffff;
}
</style>
</head>

also, I saw

body
h1
{
...

Is that intended?


Need Your Help

integer variable in awk script

shell awk

I have the following code in a shell script: to count the number of columns first (variable numCol), then plug it in the for-loop in the awk to check if all the values are all 0s in each line:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.