HTML - Document Type Does Not Allow Element "style" Here.
Hello Everyone,
Please help me. I am going to validate my html page using w3c html validator. I got the errors like this document type does not allow element "STYLE" here. <style type="text/css"> Please anyone help me how to solve this error. Thanks in advance. Prabhu Similar TutorialsHey guys, I've been working on this website some more, & many of you have been a great help to me in the past. I've come with another question.. http://www.cedarcreekyouth.org/ This is the page I ran through the W3C Validation thing.. I've got two more errors and three more warnings. I do not know how to fix them.. I've tried a few things, but my knowledge has failed me. Could someone show me how to fix this, with an explanation? Please and Thank you. Cody Hi I'm having problems with this code the 1st section is what W3 gave me, unsure which one to use the bottom section is what I have in my website, thanks for any help Line 704, Column 8: document type does not allow element "STRONG" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "CENTER", "NOSCRIPT", "NOFRAMES", "BLOCKQUOTE", "FORM", "ADDRESS" start-tag <strong><span class="c22"><strong><span class="c22"><strong><span class="c22"><s ✉ The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). -------------------------------------------------------------------------------------------------------- <h3 class="c18"><strong><a href="Photo%20Gallery2.htm"><span class="c22"><img src="aSinkingphoto2.jpg" alt="Photo Gallery of ships, mammels, icebergs and fish" width="190" height="103" border="0" usemap="Index.htm#Map2Map" class="style1"></span></a> <span class="c22"><map name="Map2Map" id="Map22"> <area shape="rect" coords="-9,-5,191,106" href="Photo%20Gallery2.htm" target="_self" alt="Photo Gallery of Ships"> <strong><span class="c22"><strong><span class="c22"><strong><span class="c22"><strong><span class="c22"><strong><span class="c22"><strong><span class="c22"><span class="style2 c23"> href="Photo%20Gallery2.htm" target="_self"><br></span> <span class="style1">href="Photo%20Gallery2.htm" target="_self"><span class="c23"><strong>Click image for Photo Gallery</strong></span></span></span></strong></span></strong></span></strong></span></strong></span></strong></span></strong ></map></span></strong></h3> hi, i am working on <div> i have to hide some part of the table. I am not able to hide that table part can anybady tell me where is the error. Code: <html> <head> <script type="text/javascript"> function callme(){ document.getElementById("hid").style.visibility="visible"; } function hideme(){ document.getElementById("hid").style.visibility="hidden"; } </script> </head> <body> <form name="myform"> <table width="100%" border="4" cellpadding="2" cellspacing="2"> <tr> <td class="tableheader" colspan="9">TS </td> </tr> <div style="visibility:hidden" id="hid"> <tr> <td width="17%" class="labeltext">Tran Code</td> <td width="1%" class="blanktext">:</td> <td colspan="4" class="blanktext">Name</td> </tr> <tr> <td width="17%" class="labeltext">Product Type</td> <td width="1%" class="blanktext">:</td> <td colspan="4" class="blanktext"> </td> </tr> </div> <tr> <td> </td> </tr> </table> <input type="button" onclick="callme()" value="show"> <input type="button" onclick="hideme()" value="hide"> </form> </body> </html> thx in Adv, Hanm. Hi, I have got an input form to upload files; the form also accepts some other user input. The upload works fine, but I need to display some filenames by default, but this does not work. I tried using: <input type="file" name="images[]" value="<?php echo $default_filename; ?>"... This did not work, so I tried: <input type="file" name="images[]" value="Testfile.jpg"..., but this does not work too. All this is in a <form action="<?php echo $_PHP_SELF; ?>" method="post" enctype="multipart/form-data">. It seems to me that in an input field of type "file", default values are not accepted, though they should be according to the documentation. Any help will be greatly appreciated as I need this feature. Thanks On my page, I have a form: HTML Code: <div id="upfile"> <input type="file" name="uploadform" size="30" id="fileupload2"> </div> Now, I'm wondering, is there any way that I can set a default value for this? Ex "C:\My Documents\file.txt". I tried value=, but I guess it doesn't work for the "file" type. I'd change it, but I need it to be "file".. Any help? Edit: Just realized that spelling mistake in the title.. Can someone help here. I have tried other groups and no help. I have a web page with image buttons. This is supposed to take me to difrent web pages depending on which button is clicked. This works in Firefox and Opera but not in IE8 http://www.des-otoole.co.uk/cms/admin/pages.php Desmond. i have seen alot of place on web that sometimes programmers are using :- <input type="button" / > and sometimes <input type="button" > Is there any difference between the two? What is correct way of using <input> tag, is it with end slash '/' or not ? I know from personal experience, the specs and some great posts that DIV's are not allowed inside of P tags. And it's normal to be so, but what about inline-blocks? I could simply use SPAN or some other inline element which works inside the P, but IE only renders natural blocks as inline-block. Meaning if it's an inline element it will work in Firefox but not IE, if it's a block the other way arround. So how do I solve this quanundrum? Either I need an element which is a natural block in IE and is allowed inside a P by the specs, or I'll use DIV instead of P, but I would much rather avoid this. hi i keep getting spam from my site because their is no security on my 'comments' box. where can i find a code for putting one of those scrambled images that u have to type in that computers arent meant to be able to recognise? i dont know what to type in in google? thanks in advance A validated my html with w3's validator. I don't know what is worng. HTML Code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title> Tyilo's chat </title> <link rel="shortcut icon" href="chat.ico"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <base href="http://tyilo.jbusers.com/"> <style type="text/css"> body { background-image: url("http://tyilo.jbusers.com/back.png"); } h1 { color: #00FF00; font-family: Impact; font-size: 50px; text-align: center; } h2 { color: #00FF00; font-family: Impact; font-size: 35px; text-align: center; } p, table { color: #FFFFFF; font-family: Impact; font-weight: bold; font-size: 20px; text-align: center; } table { margin-left: auto; margin-right: auto; } img { border: none; } div.error { color: #FF0000; } a:link { color: #00FF00; } a:visited { color: #FF00FF; } a:active { color: #FF0000; } a:hover { background-color: #000000; } </style> </head> <body> <script type="text/javascript"> if(document.URL.search(/(www)|(index.php)/i) > -1) { document.location = document.URL.replace("www.", "").replace("index.php", ""); } </script> <h2> <a href=""> <img src="home.ico" alt=""> Home </a> <a href="/chat"> <img src="chat.ico" alt=""> Chat </a> </h2> <hr><h1> Tyilo's chat! </h1> <table> <tr> <th width="40%"> Login </th> <th width="20%"> OR </th> <th width="40%"> Register </th> </tr> <tr> <td> <form action="chat/" method="POST"> <p> <input type="hidden" name="mode" value="1"> Username: <input type="text" name="username"> <br> <div class='error'>No username entered!</div><br><br> Password: <input type="password" name="password"> <br> <div class='error'>No password entered!</div><br><br> <input type="submit" value="Login"> </p> </form> </td> <td> </td> <td> <form action="chat/" method="POST"> <p> <input type="hidden" name="mode" value="2"> Username: <input type="text" name="username"> <br> <br> Password: <input type="password" name="password"> <br> <br> <input type="submit" value="Register"> </p> </form> </td> </tr> </table> </body> </html> I am not sure where to put this question. I have noticed that some webpages have graphics to make it look like a piece of paper stuck on the wall (and there is a certain amount of blank space left and right - see http://www.infinetwebsolutions.com/) while some webpages occupy the whole screen - see http://www.speakteen.com/. Can someone tell me if there are technical advantages/reasons for doing this? I have been reading webpages and blog pages for dozens of hours and am starting to feel that blogs all look alike. Part of the reason is that almost all of them have the "cut page" look rather than the full page look. Is there an artistic reason to do this? some advantage? I really like nice cut and dried technical stuff but I am more likely to be considered autistic than artistic hello; I would like to do this Code: <div id="a_div" class="a_class" my_html_prop="javascript:my_function( )" // my_function returns a number style="left:my_html_prop " > ... any thoughts? thanks dsdsdsdsd A customer gave me a Word doc that they want turned into a printer friendly web page. I understand that there are tons of ways to do this but I really want the answer to the subject. What i'm referring to is a form that someone can print from the browser and "fill in the blanks" on the page where there are "underscores". My question is how to code those underscores. I tried manipulating the <hr> tag but it's putting way too much space in between each <hr>. I've already coded a "fill in the blank" line using <u> nbsp;</u> but that looks very messy. What do you guys/gals think? http://www.colletts.co.uk/winter_dolomites.htm I have the above page that redirects users to my Winter Website - the HTML below isn't valid W3C does anyone know of a better and valid way to get this done? Cheers, Mas HTML Code: <META HTTP-EQUIV="Refresh" CONTENT="2.5;URL=http://www.colletts.co.uk/winter/winter_dolomites.html" /> I have a project written in ASP.NET under Visual Studio 2005 with C#. I am also using Infragistics objects for .NET Advantage 2007. In my page to attach resources to a record I have written a browser and am displaying previously chosen resources here. But when I click the upload button the page opens a new window (which is not a dialog window, but a normal one) which is exactly the same as my dialog window. How can this possibly happen? Can anyone help me? I've had problems validating my site. I am getting this error multiple times: document type does not allow element "span" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "pre", "address", "fieldset" start-tag. This also occurs for "br", "a", "input", and "hr". All of these tags are already in div tags. I've also tried to surround them in p tags, but I still got the same error. There are no other validation errors with my site. Thanks. I was hoping someone could clue me in as to whether or not this would be possible. I'm thinking it isn't but I need to make sure. I'd like to provide a file for people to download on my website, but when they click on the link and the download window appears I don't want them to have the option of opening it. Is it possible to only give them the option to save the file? Sounds incredibly unlikely but I gotta know. Hello, I want to load a page in a iframe, and when i do this, i want that page to be displayed not at the begining of that page, i want that page to be displayed at a "x" and "y" position specificated by me. How can i do that? Thank you. Hey, I'm trying to write some code for expanding and concealing text You can see this in action at youtube when you click the (more) button to expand text. Suppose I had a heading: MyHeading and a body of text: MyTextHere How do I make it so that when you click MyHeading it makes MyTextHere (initially not visible) appear, and when you click MyHeading again, it makes MyTextHere disappear? Thanks Alot. |