HTML - Optional Closing Tags In Html
For as long as I've been validating web pages, I never realized that the closing </head> tag was optional in HTML. I feel as if I've missed the boat at times.
While I'm all for trimming excess code, I just cannot for the life of me strip out closing tags because they are optional in HTML. I'd be concerned that something, somewhere would not parse the document correctly if I removed the closing </head> element. Are my concerns unfounded? Similar TutorialsFor as long as I've been validating web pages, I never realized that the closing </head> tag was optional in HTML. I feel as if I've missed the boat at times. While I'm all for trimming excess code, I just cannot for the life of me strip out closing tags because they are optional in HTML. I'd be concerned that something, somewhere would not parse the document correctly if I removed the closing </head> element. Are my concerns unfounded? For as long as I've been validating web pages, I never realized that the closing </head> tag was optional in HTML. I feel as if I've missed the boat at times. While I'm all for trimming excess code, I just cannot for the life of me strip out closing tags because they are optional in HTML. I'd be concerned that something, somewhere would not parse the document correctly if I removed the closing </head> element. Are my concerns unfounded? For some reason, on my homepage (http://www.projectdisobey.com/disobeyclothing/) an extra '</div> <!-- content #end -->' is being created in the page source, AFTER the closing 'body' and 'html' tags. There is no mention of '</div> <!-- content #end -->' in my 'footer.php' file, so why does this show up in the page source? Please see the attachment. If anybody could point me in the right direction as to why this might be occurring, and how I might fix it, I would be eternally grateful! Thanks! Hi all. Working on some php program, i tried to get the things tidy in my HTML code. So what I did is something like this : Code: <div id="something"> ... some php code and stuff ... </div id="something"> It seems to work, not even a warning with the firefox extension to validate HTML. So I'm wondering. Are closing tags not parsed farther than the word following the '/' ? As I have not tested it on other browsers, do you think it's safe to keep it like this ? I browsed the HTML 4.01 reference, not found a line about the way closing tags may be treated. I still think it's a very good way for me to debug/find my toes in a long HTML file, only need a regexp to have my whole <div> element, no more eye killing research counting the </div>s. But I'm afraid some browsers reject these closing tags. Any advice ? Thanks. Guillaume What is the difference between <link href="styles.css"/> and <link rel="stylesheet" type="text/css" href="styles.css"/>? Is there something different which takes place "behind the curtains"? Hello Im new to html and css. Im creating a menu using a css using the <a> tag. when I use the <a> tag later in my code it uses the css. How do I uses the <a> tag in multiple places on the page and without using the css? Here is an example of the css code used. HTML Code: a:link,a:visited { display:block; font-weight:bold; color:#FF0; background-color:#03F; text-align:center; padding:12px; text-decoration:none; text-transform:uppercase; } a:hover,a:active { background-color:#FF0; color:#03f; } I have gone back from scratch in HTML but this time creating my own tutorial as I go along and have covered a few items before right here on this forum before and now I just can't seem to remember and understand the bleepety-bleep-bleep-BLEEP things no matter how many tutorials I read a million times on the net, so really freaking frustrating, my head is about to explode, sorry got to vent somewhere before I run amok! Ok, [I'm taking a few deep breaths here......], let me start with "linking to a location on the same page", I see the anchors Quote: <a href="#myanchor">Go to anchor</a> <a name="myanchor">My Anchor</a> Using my text here as an example, I want to use the word in the first line "gone" to link directly to the word "million" in the 5th line from the top, how do I do this please? I am using the following css <style type="text/css"> #testbar{ position:absolute; background-color: transparent; width: 730px; height: 94px; visibility: hidden; z-index: 100; } </style> then some java script then Html div tag to show the id <div id="testbar"> <a>Close</a> <script src="/testjs.js"></script> </div> The <a>close</a> following the code as i give in js but the testjs.js is not following the specifications produced by that some java script i used this one working in IE but not in firefox3.5 what might be the problem? can u give the solution ________________________ Hello Everyone, I have just started learning html and I am facing a problem. I have wrote the following code in notepad: Code: <h3> HTML Images - The <img> Tag and the Src Attribute </h3> <p> The <img> tag is empty, which means that it contains attributes only, and has no closing tag.<b/><br/> When I open this html file in browser, text "<img>" does not display correctly. Please help me asap. Thanks! Hello HTML Forum, I am having a slight problem. I want to include the tag in my string of letters, to be printed out to the user, but it keeps putting the tags into format. Example: Code: the <h1> tag will create a "header" size "1" tag. Which validates the rest of the code as style: <h1> So how can I show my readers what tag i'm using, without initializing that tag? -Jeff I know that notepad is effective for using HTML tages and save notepad as [save as: name.html] and then it appears like a webpage. I don't know how to do the same with (wordpad, microsoft office word) When I add HTML tages to wordpad or microsoft office word and [save as :name.HTML] it doesn't appear as webpage, when I write an ordinary content in wordpad or microsoft office word how to open and edite the content with HTML tages I work as a product manager for a company and one of my responsibilities is to update pricing on our website and I've just recently taken to making cool tables to reference similar products on select product pages. However, with each reference in a description field, the more search results get convoluted and the harder it is to get what you are searching for the come up because our website search tool lists searches alphabetically rather than by relevance. So my question is this: are there any HTML tags that bypass the way search tools organize its listings and let the webmaster specify, "I want this product to show up first in a search." For example, one of our product numbers is P992. We sell similar products, like P993, P994, etc. and I reference P992 on each of these other product pages, but with each product I mention P992 on, that product shows up when you search for P992 on our site, as well. Most of the time the actual product that is searched for is buried somewhere in the middle, depending on where it stands alphabetically, and I can't figure out how to get it to show up at the top of the page. Anyone have any suggestions? I'd rather not spend money on a more advanced search tool and would much rather manually tell our search engine to list the actual product, P992, first and then all other products that mention P992 in their description field to be listed after that. Thanks for any help. Hello Are there any valid HTML tags that you can embed in a page that do not display content on the page? I am looking to store data that a RSS feed can retrieve on a news page, but I don't want the content to display on the news page, only be pulled for the RSS feed. Paul Hi People. I am hooked onto AJAX based apps these days. Instead of using JS to create html using strings. What I did was create a structure in html and clone it to repeat the structure using JS. But, to prevent DOM from being corrupted, I had to append a unique number to the ID of each element (and I had to attach the data to the element anyway). So, instead what I did was remove the ID of the element while cloning and used my own 'data' attribute to attach the data to the element. But, this would violate the W3 standards, right? Or it Wont? What is a better solution? I am having problems with putting HTML code into an RSS 2.0 description tag. If I escape the HTML using <![CDATA[, the HTML shows up fine when the feed is viewed with Firefox 2.0, IE7, and various feed readers. The problem occurs when browsers like IE6 and Netscape view the .xml feed, as these do not support native RSS. To allow the latter browsers to easily display the feed, I use XSL to transform the XML into something much nicer. However, the escaped HTML shows up as literal characters (code) in the feed when viewed with IE6 and Netscape. How can I show HTML in the description tag of an XML feed using XSL? I also get literal characters when trying entity-encoded HTML. i'm looking for a cheap way out of making collapse/expand code. i've learned a lot of 'ghetto' techniques n thought mayb i can use something similar to the html tricks i've learned in the past. the theory i have is.. i use the title of the collapse/expand text as a link to the text below it to open and close by using the navigating tags: Code: <a name="content">opening/closing text here</a> and the title above the content: Code: <a href="#content">Title</a> to open the area of text. now my idea of a shortcut around the whole css/html/javacript combo is to make the text below it use a Code: <font size=0>content</font> at default and have the href title link change the font size to the default 9pt but I don't know if that's even possible. Is it possible with the Code: <div> tags? and if so, using that, would i still b able to make a link like that? Is it possible to trigger the action of a form with a submit button that's outside the form tags? If so, how should this example be rescripted to make the input tag work outside the form tags? [/code] <html> <body> <form name="input" action="html_form_action.asp" method="get"> First name: <input type="text" name="FirstName" value="Mickey" /><br /> Last name: <input type="text" name="LastName" value="Mouse" /><br /> <input type="submit" value="Submit" /> </form> </body> </html> [/code] I have a small window that shows site logins by ip address. I open it with window.open and get exactly the proper display in the proper position. But, I'm stuck with the browser page that called window.open(). Is there a way to close that browser? I've tried things like window.opener.close() with no luck. Remember, I want t close the browser, not just a window. Thanks, Mac must be a dumb question but my book dont say how when you want to simply have a link to say "close this window" ie for dummies that dont know to goto the big X up top, what it the code?? |