HTML - Correct Style Type Code For H1?
Is this the correct code for setting an h1 tag to a specific color, bold, and centered, in an HTML4.01 transitional document?
<style type="text/css"> <!-- h1 {color: #ffffff;font-weight: bold;text-align: center}--></style> Some HTML testing programs make this note: empty container element <STYLE>. I'm not sure what this means or how it applies. Similar TutorialsI have a simple form which consists of 3 radio buttons (it is one of those feedback questions at the bottom of a web page asking "Did you find this page helpful? Yes A little No"). I looked up several websites to get the supposedly correct code, and basically they all suggested something like this for each button: Quote: <label for="r1"> <input type="radio" name="group1" id="r1" value="1" /> button one</label> The form is enclosed within <p> and <form> tags, and this is the HTML code I used for each of the buttons (with different labels and ids of course): Quote: <label for="n2">Yes</label> <input type="radio" name="helpful" id="n2" value="2" onclick="hresponse('2')" > But when I try to validate this page with the W3C validator, I get 9 errors, with the one relevant here being: Quote: Line 256, Column 19: document type does not allow element "LABEL" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag <label for="n2" > Yes</label> 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. If I change my code to: Quote: <label for="n2">Yes <input type="radio" name="helpful" id="n2" value="2" onclick="hresponse('2')" > </label> I only get 6 errors, but this particular error still occurs for each button. I am using HTML 4.01 strict. Can anyone explain what is happening here please, and how to fix it? Thanks. Hello guys, I have just created a simple website using Flash. Then I have embedded this .swf movie onto simple HTML document. I am wondering if you could check that HTML code for me and let me know whether it is correct. http://www.icebergfilms.com Thank you so much for your help. 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 <!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" lang="en" xml:lang="en"> <body bgcolor=999900 text=990000> <div align="center"> <h1><img width="50" height="50" src="../../3com0125%20DEIS/Assessment%20Briefings/sunflower.gif"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Modules in the BSc / BA SSAM programme</font><img width="50" height="50" src="../../3com0125%20DEIS/Assessment %20Briefings/sunflower.gif"></h1> </div> <center> <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"> <hr> </font> <p><font face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular"><a href="../../3com0125%20DEIS/Assessment%20Briefings/index.html">Home Page</a> /<a href="../../3com0125%20DEIS/Assessment%20Briefings/SSAM.html"> Programme Description</a> / <a href="../../3com0125%20DEIS/Assessment %20Briefings/diary.html">Timetables and Diary Dates</a> / <a href="../../3com0125%20DEIS/Assessment%20Briefings/help.html">Help and Advice</a> / <a href="../../3com0125%20DEIS/Assessment%20Briefings/staff.html">Contact Us</a> / <a href="../../3com0125%20DEIS/Assessment%20Briefings/News.html">News</a> / </font></p> </center> <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"> <hr> </font> <h3> <h3><font face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">Level 3 modules </font></h3> </h3> <div align="center"> <table border="1" frame="Box" rules="All"> <tr height="19"> <td align="center" height="19" width="96"><b><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">Code</font></b></td> <td align="center" height="19" width="350"><b><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">Course</font></b></td> <td align="center" height="19" width="73"><b><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">Credit Points</font></b></td> <td width="73" height="19"> <center> <b><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Semesters</font></b></center> </td> </tr> <tr height="19"> <td height="19" width="96"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">3MMF0028<br> 3COM0122</font></td> <td align="left" height="19" width="350"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">BA Contextual Study<br> BSc Contextual Study</font></td> <td align="center" height="19" width="73"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">15</font></td> <td width="73" height="19"> <center> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">A</font></center> </td> </tr> <tr height="16"> <td height="16" width="96"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">3MMF0022<br> 3COM0121</font></td> <td align="left" height="16" width="350"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">BA Project Planning<br> BSc Project Planning</font></td> <td align="center" height="16" width="73"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">15</font></td> <td width="73" height="16"> <center> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">A</font></center> </td> </tr> <tr height="19"> <td height="19" width="96"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><font size="2">3MMF0024</font></font></td> <td align="left" height="19" width="350"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">Competitions</font></td> <td align="center" height="19" width="73"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">15</font></td> <td width="73" height="19"> <center> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">A</font></center> </td> </tr> <tr height="19"> <td height="19" width="96"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><font size="2">3MMF0025</font></font></td> <td align="left" height="19" width="350"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">Industry and Sector Study<br> Career Contexts and Visions</font></td> <td align="center" height="19" width="73"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">15</font></td> <td width="73" height="19"> <div align="center"> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">B</font></div> </td> </tr> <tr height="19"> <td height="19" width="96"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">3MMF0023<br> 3COM0126</font></td> <td align="left" height="19" width="350"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">BA Project Realisation<br> BSc Project Realisation</font></td> <td align="center" height="19" width="73"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">30</font></td> <td width="73" height="19"> <div align="center"> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">B</font></div> </td> </tr> <tr height="19"> <td width="604" height="19" colspan="4"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">And a choice of one of the following in Semester A:</font></td> </tr> <tr height="19"> <td height="19" width="96"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><font size="2">3MMF0026</font></font></td> <td align="left" height="19" width="350"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">Webarts </font></td> <td align="center" height="19" width="73"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">15</font></td> <td width="73" height="19"> <center> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">A</font></center> </td> </tr> <tr height="19"> <td width="96" height="19"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">3COM0123</font></td> <td width="350" height="19"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">3D Interactive Media</font></td> <td width="73" height="19" align="center"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">15</font></td> <td width="73" height="19"> <center> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">A</font></center> </td> </tr> <tr height="19"> <td colspan="4" width="604" height="19"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">And a choice of one of the following in Semester B:</font></td> </tr> <tr height="19"> <td width="96" height="19"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">3COM0124</font></td> <td width="350" height="19"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Webware</font></td> <td width="73" height="19" align="center"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">15</font></td> <td width="73" height="19"> <div align="center"> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">B</font></div> </td> </tr> <tr height="19"> <td width="96" height="19"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">3COM0125</font></td> <td width="350" height="19"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Design and Evaluation of Interactive Systems</font></td> <td width="73" height="19" align="center"><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans- Regular">15</font></td> <td width="73" height="19"> <div align="center"> <font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">B</font></div> </td> </table> </div> <p></p> <h4><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Term Dates, Other Significant Dates and Assessment Deadlines</font></h4> <p><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Click <a href="../../3com0125%20DEIS/Assessment%20Briefings/Calander0809.html">here </a> for a calander of term dates or <a href="../../Not%20current/SSAM %20review/Assessments0607.html">here</a> for a list of the assessment deadlines for all of the modules from last year. This only serves to give you an impression of what is likely to happen and to help you plan your work time. You will have to consult each module's StudyNet web site for a more definitive view of what the deadlines are.</font></p> <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"> <hr> </font> <address><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Maintained by <a href="mailto:L.J.Pye@herts.ac.uk">Lynette J Pye<br> </a> University of Hertfordshire Higher Education Corporation</font></address> <address><a href="http://www.herts.ac.uk/disclaimer.html"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Disclaimer</font></a></address> </body> </html> How would I make a search-type form that would insert what the user typed in a text box into a web address and go to that address? (for example, if they type 'help' and click the submit button, it would go to the page "http://www.websitename.com/help.html") I know the general form code, but I can't figure out if I would use a tag in the 'onSubmit' portion, or use javascript, or something else altogether. I didn't make this on frontpage. I made this through notepad. my teacher asked me to make a web page for an organization on our school's website. the whole thing is basically a form. so far i've just made the basic page without any designing yet. i'm sure i did everything correctly except for the submit button. what i want is when you click the submit button, for the browser to automatically send some sort of email to the provided address. instead, it opens up outlook. i don't want that to happen. what should i do to fix this? i will copy and paste my source code here but i will hide the email address with "*'s" just for privacy. Code: <html> <head> <title>Academy of Finance</title> </head> <body> <h1 align="center">Academy of Finance</h1> <h3 align="center">All Academy of Finance Alumni are invited to attend a reunion during the Thanksgiving weekend of 2009!</h3> <hr> <form action="mailto:********@gmail.com" method="post" enctype="text/plain"> <p> <b>Would you be interested in attending an Academy of Finance reunion Thanksgiving Weekend 2009?</b> <p> <input type="radio" name="yes" value="yes"> Yes <br> <input type="radio" name="no" value="no"> No <p> <b>Even if you answered no to this question, please fill out the following information so that we can verify that you will be unable to attend the reunion. Thank you!</b> <p> <fieldset> <legend> <b>Name:</b> </legend> <p> First Name: <input type="text" name="name" size="30"> <p> Last Name: <input type="text" name="name" size="30"> </fieldset> <p> <fieldset> <legend> <b>Address:</b> </legend> <p> City: <input type="text" name="city" size="30"> <p> State: <input type="text" name="state" size="30"> <p> Zip Code: <input type="text" name="zipcode" size="30"> </fieldset> <p> <fieldset> <legend> <b>Phone:</b> </legend> <p> Home Phone: <input type="text" name="state" size="30"> <p> Cell Phone: <input type="text" name="state" size="30"> </fieldset> <p> <fieldset> <legend> <b>Graduation Year</b> </legend> <p> Year of Graduation: <select name="year of graduation"> <option value="Select">Select</option> <option value="1990">1990</option> <option value="1991">1991</option> <option value="1992">1992</option> <option value="1993">1993</option> <option value="1994">1993</option> <option value="1995">1993</option> <option value="1996">1993</option> <option value="1997">1993</option> <option value="1998">1993</option> <option value="1999">1993</option> <option value="2000">2000</option> <option value="2001">2001</option> <option value="2002">2002</option> <option value="2003">2003</option> <option value="2004">2004</option> <option value="2005">2005</option> <option value="2006">2006</option> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> </select> </fieldset> <p> <fieldset> <legend> <b>Current Status</b> </legend> Current Organization: <input type="text" name="current organization" size="30"> <p> Current Occupation: <input type="text" name="current occupation" size="30"> </fieldset> <p> <fieldset> <legend> <b>College</b> </legend> College Attended: <input type="text" name="college attended" size="30"> <p> Degree Attained: <input type="text" name="degree attained" size="30"> </fieldset> <p> <fieldset> <legend> <b>Additional Comments</b> </legend> <blockquote> Additional Comments: <p> <textarea name="comments" id="comments"> </textarea> </blockquote> </fieldset> <p> <input type="submit" value="Submit"> <input type="reset" value="Clear All"> </body> </html> i really don't know what i did incorrectly. i'm not sure how i can get the submit button to send everything to my email directly without the use of any email manager. please help me out. thanks. I have this task as part of an HTML class project. It has to be done using the <embed> tag, and must repeat a wav file twice (playing it three times total). This is the code I'm using: <p> <embed src="background.wav" width="145" height="100" hidden="true" autostart="true" playcount="3" loop="3" /> </p> It doesn't loop at all in firefox, and in IE it loops constantly. If I remove the loop="3" attribute, it works properly in IE. Is there any way to get this working across browsers using the embed tag, or would a more complex method be needed? (such as javascript browser detection with browser specific code). I'm really stuck on this, any help would be really appreciated. I apologize if I am posting this in the wrong section. I am looking for a code or script for a certain type of game but I can't even figure out what this type of game would be called. The game I am talking about is called "cryptopix" at tanga.com. I would really like to implement something like that on my website that members could create and participate in. If anyone can help point me in the right direction I would be forever grateful This is free to use: http://www.tradelinksfree.com/htmleditor.htm hey guys. I need help again! Well actually its a question But before that question - You see I play a game and in that game I want to make a list of things. Here is my noob website - http://heroonline.synthasite.com/ The Question -I guess what I'm asking is how do I post a forum directly onto a page of mywebsite with separate moderator accounts? I need forums that can be added to sites like myspace, and my website, that you post with a html code, and editable by multiply accounts? On that forum I just want one thread where i can post names of people. And I want some other people to be able to post names on that one thread. Kind of like the cbox I have on there but more like forums, and changeable by other people/accounts that i choose. Hope you guys understand what I am trying to say here... I'm a noob and i tried my best to explain. Conflict between Mime Type and Document Type... Morning - I have recently been learning CSS and have been upgrading my site to Semantically correct code. The first templat I am building is the following page http://www.colletts.co.uk/colletts_n...ndexflash.html and validates here validates... sort of. Should I be worried about the mime type, what effect will this have on the page. If I follow the instructions and change the file extension to xhtml all hell breaks loose - http://www.colletts.co.uk/colletts_n...dexflash.xhtml IE Error - can't open thios document etc... What am I doing wrong??? Best, Mas 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 i'm trying to figure out what i'm doing wrong with adding some ssi into my codes. i'm trying to get my menu to be to the left of my main body information of each page. i got it working by pure luck on this one, but i can't get it working on the other pages. here's some of the code from the correctly working page: .... <body> <table class="try" cellspacing="0"> <tr> <!---#include file= "ssi/header.ssi"--> <!--************Header Cell start***********--> <tr> <!---#include file= "ssi/menu.ssi"---> <!--**********Menu cell stops**********--> <!--**********Body cell starts*********--> <td class="body"> <!--**********BODY CONTENT...ALL!**********--> <h2 class="texttitle"> Text + Lists Page</h2> <p class="book"> <a href="http://www.thelatinlibrary.com/cicero/fin.shtml"> The Extremes of Good and Evil</a></span> <p class="author">by Cicero (circa 45 B.C.)</span> .... and here's one from my other pages: .... <body> <tr> <!--#include file= "ssi/header.ssi"--> </tr> <tr> <!--#include file= "ssi/menu.ssi"--> <form action="http://usm.maine.edu/cgi-bin/cgi-mailer.pl" method="post"> <p><input name="destination" value="brandonmckenney@gmail.com" type="hidden"></p>....... those are just from the beginning parts of my body sections. what am i doing wrong. the menu shows up but it shows up on top of the body info like the header. any help will be greatly appreciated as this is due on my server for class tomorrow morning! I understand that there should only be one H1 tag in a document, but what about H2, H3 etc. For example if I had a page listing products I would apply the H1 tag to the category, but I think the products in the list would be of equal importance, so would it be semantically correct to apply H2 tags to the products? And to take it a bit further, if each of the product had options (i.e. sub-products), would it be correct to apply H3 tags to the options? e.g. <h1>Dogs</h1> <h2>Labrador</h2> <h3>Golden</h3> <h3>Chocolate</h3> <h3>Black</h3> <h2>Collie</h2> <h3>Border</h3> <h3>Rough</h3> <h3>Bearded</h3> <h2>Boxer</h2> <h2>Retreiver</h2> <h3>Golden</h3> <h3>Flat coat</h3> Thanks How do i insert a coloured line in the page without declaring the line propertoes in the CSS. I've used the following code, but the W3C validator was not happy. It said there's something wrong with the last portions of the code line. I use HTML 4.01 Transitional doctype.The HTML code I used is .... <hr size="1" Width="90%" align="center" color="#ff6600" /> Please help with the correct syntax or tips. Even better would be how to make it happen by inserting these <hr> styles into the CSS. (I'm a beginner in HTML) I'm currently using .em for font size. I have set the font size and font in body, but the font is not being applied to inputs and the font size is not being applied to lists. My font size is currently set at 1em, and I have to put 100% as font size in my divs for it to be 1em. I'm wondering how and where I should set the font and font size so it will apply to everything? below is from a W3C linkchecker - how do I provide a valid URL for validating my page? The link provided by W3C isn't valid? - my page www.colletts.co.uk Quote: Fragments listed are broken. See the table below to know what action to take. Code Occurrences What to do 403 1 The link is forbidden! This needs fixing. Usual suspects: a missing index.html or Overview.html, or a missing ACL. http://validator.w3.org/check?uri=ht....uk/index.html What to do: The link is forbidden! This needs fixing. Usual suspects: a missing index.html or Overview.html, or a missing ACL. Response status code: 403 Response message: Checking non-public IP address disallowed by link checker configuration Line: 258 I have a piece of code that looks like this: <p class="stylegoeshere"> <h3>...</h3> ... </p> I'm not sure if this is semantically correct If not, then I'll have to use this: <div class="stylegoeshere"> <h3>...</h3> <p> ... </p> </div> |