|
|
Posted in Computers & Tech / Programming / Scripting / PHP
Author: TavoxPeru Total-Replies: 0 Hi, Recently the host server of one of my clients change its PHP installation from the Apache mode to the CGI mode so because of this change i got some problems. For example, whatever page i view it shows these warnings at the top of the page:
Warning: session_start() [function.session-start]: open(/tmp/sess_b05e459fe625d81a303b59982be3da39, O_RDWR) failed: Permission denied (13) in /home/client_username/public_html/functions.php on line 9
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/client_username/public_html/functions.php:9) in /home/client_username/public_html/functions.php on line 9 And these ones at the bottom:
Warning: Unknown(): open(/tmp/sess_b05e459fe625d81a303b59982be3da39, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Another problem occurs when i try to validate the php page -includes forms and links that use sessions- as a strict xhtml 1.1 page with the W3C XHTML VALIDATOR, it consists that everytime i send it to the validator it creates a hidden input with the PHP PHPSESSID in the form and also adds to the href attribute of every link this PHPSESSID, for this problem i got the solution a time ago as stated in this topic: but because of the change of the PHP mode as i say before the page dont validate.Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 After some tests and research at the PHP site i finally solve this problems by using the ini_set php function to set the url_rewriter.tags, the arg_separator.output and the session.save_path in every php page that you want to be valid xhtml1.1 as the following code: CODE<?phpini_set("session.save_path","/home/client_username/tmp/"); ini_set ("arg_separator.output", "&"); ini_set("url_rewriter.tags","a=href,area=href,frame=src,input=src"); if (session_id() == "") session_start(); ?> Because PHP is in CGI mode i notice that i can not use a .htaccess file so i add the previous code in a general php file and include it to my pages with the include() php function, and also, i change the permissions of the folder that i set in the session.save_path to be writable -chmod 750- and now every thing works perfectly and the page is a valid XHTML 1.1 file. Hope that this helps someone. Best regards,
Sun Apr 1, 2007
Reply New Discussion
Posted in Computers & Tech / Programming / Scripting / PHP
Author: TavoxPeru Total-Replies: 6 Hi, i have a problem when i try to validate a php page that includes a litlle form and use sessions as a strict xhtml 1.1 page with the W3C XHTML VALIDATOR, the problem consists that everytime i send it to the validator it creates a hidden input with the PHP PHPSESSID in the form and also adds to the href attribute of every link this PHPSESSID, so if you have for example a link like this: CODE<a href="page.php?sessionvar=1">page with session var equal 1</a>it results in this: CODE<a href="page.php?sessionvar=1&PHPSESSID=Some_Value">page with session var equal 1</a>and as you know it is recommended that always replace & with & to make your page valid XHTML 1.1 Can someone knows a solution for this???? Best regards,
Fri Feb 2, 2007
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Programming / HTML, XML and other Markup Lan..
Author: overture Total-Replies: 7 This is going to be an extremely simple tutorial for you all. I know many people still don't understand XHTML in the respect of "why use it", but this tutorial is not to explain to you why, i believe mastercomputers explained it all in another topic. This topic is to tell you how to open another window while being XHTML 1.0, 1.1 valid. I will be using Javascript so you can either put the code in an external file and link to it (remember to add the '/' before the '>' This is the simple Javascript function we will be using: CODEfunction launchit(url) {[tab][/tab]window.open(url); } This function when called upon will create and open a window which will take you to the website which has been given. The above code has a variable within it called 'url', this is so that it knows that something is going to be used in order for the function to work correctly, in this case a website address. This is the code to use it correctly: CODE<a href="http://overture.uni.cc" onclick="launchit('http://overture.uni.cc'); return false;">Some Link</a>As you can see the function is called upon using the onclick event within the anchor tag. I hear you say "what does the 'return false' do". This basically stops the focused window (the window which the link is on) to not go to that website as we want it to open in another window (that is the whole point of this tutorial). The normal way to do this would be to use this code: CODEtarget="_blank"This would open the window getting the url from within the href="". This however is not valid XHTML and will return and error when it is checked. This is because the 'target' attribute is not supported in XHTML 1.0 or 1.1. I do believe it is in XHTML TRANSITIONAL (could someone verify that for me). Well that is it. I believe this all works correctly. If not tell me the problem and i will try and correct yours or my mistake. overture.
Mon Feb 14, 2005
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Websites and Web Designing
Author: FirefoxRocks Total-Replies: 3 As you know, if you use the XML encoding tag, XHTML Doctype and the XML Namespace attribute in the html tag on a .php document, it won't render properly and will infact display errors. A solution to this problem is to use the require function of the PHP system. (I'm new at PHP, just learnt it yesterday, please feel free to correct anything Here are some examples of pre-body text: Normal XHTML document pre-body information: CODE[b]<?xml version='1.0' encoding='iso-8859-1'?><!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'>[/b] <head> <title>My XHTML Site</title> <link rel="stylesheet" href="allpages.css" type="text/css" /> <style type="text/css"> ...style information here... </style> </head> Normal HTML 4.01 document pre-body information: CODE[b]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">[/b]<html> <head> <title>My HTML Site</title> <link rel="stylesheet" href="allpages.css" type="text/css" /> <style type="text/css"> ...style information here... </style> </head> Note: there are also many doctypes for HTML and XHTML, these are just some examples. There is also HTML 3.2 and 2.0 instead of 4.01. PHP document: CODE<html><head> <title>My PHP Site</title> </head> Here is the one you should be using for PHP/XHTML pages: CODE<?php require("doctype.php"); ?><head> <title>Achoo!</title> <link rel="stylesheet" href="allpages.css" type="text/css" /> <style type="text/css"> ...style information here... </style> </head> The doctype.php file: CODE<?php$xml="<?xml version='1.0' encoding='iso-8859-1'?>"; $doctype="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>"; $html="<html xmlns='http://www.w3.org/1999/xhtml'>"; echo $xml . " " . $doctype . " " . $html; ?> In this case, the browser still outputs the XML encoding, the DOCTYPE declaration and the HTML document declaration. If you view the source of the page, you can't tell that it used the PHP (remember, PHP is server-side). I hope this has helped you create more valid pages for your website. Please remember, we are cleaning up the web here, so make sure your documents have valid XHTML/CSS and no broken links.
Sat Oct 28, 2006
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Websites and Web Designing
Author: FirefoxRocks Total-Replies: 11 You most likely have encountered a situation (as a web developer) where you have an iframe box and you are using valid XHTML Strict. Iframes are still valid in FRAMESET and TRANSITIONAL XHTML but it is best to use XHTML 1.0 Strict or XHTML 1.1 (application/xhtml-xml). A method for including iframes have been found. It doesn't use the <iframe> tag at all. Since tags are depreciated, new tags/CSS are to replace them (except DOM, which is a little off topic here). The <applet> and <iframe> tags were replaced by <object>. Yes, <object> is for inserting any foreign object into XHTML documents. Since IFRAMES include HTML/XHTML documents, the MIME type for the document is "text/html" or "application/xhtml+xml". We will assume the first one because it is compatible with ALL browsers including Internet Explorer. There is of course a way to serve the latter one to Mozilla-derivatives and Opera using PHP but I'll save that for another tutorial. So you have your MIME type, URL source and <object> tag. Put it together with like this: CODE<object data="http://www.x-kings.com/public/banner/guild_short.php?name=XKingdom" type="text/html"></object>A little more detail: CODE<object style="width:240px;height:70px" data="http://www.x-kings.com/public/banner/guild_short.php?name=XKingdom" type="text/html" standby="XKingdom Guild Information"></object>A variety of attributes work with the <object> tag. The elements are:
Purple attributes MAY be incompatible with browsers. From personal experience, adding those attributes will only render it in Internet Explorer. We don't want that to happen. All of these attributes + CSS is intended to replace all attributes of <iframe>. The only one I couldn't find easily was "scrolling" in <iframe>. Using CSS, the {overflow:scroll} thing works the same (haven't tested). This is my first tutorial, sorry if I was a bit unclear about things.
Mon Feb 5, 2007
Reply New Discussion
Posted in Computers & Tech / Designing / Web Design and HTML
Author: vizskywalker Total-Replies: 11 Okay, first of all, I let me explain what I want to know. XHTML 1.1 does not include the IFrame Module, which means putting an iframe into an XHTML 1.1 page will cause errors in validation. Now, I know from the Modularization of XHTML Specification that it is possible to create a DTD that contains all of the modules of XHTML 1.1 as well as the IFrame module. However, after reading through said specification, I am unsure of exactly how to go about a) writing a DTD like that and Now, the reason I want to use iframes is because of a little AJAX trick. Firefox and various other browsers register changes in iframes with the history, so you can navigate through the changes in the iframes with the back and forward buttons. This means that using some javascript and a series of iframes, it is possible to register different pieces of information retrieved with AJAX with the browser's history. Google Maps uses this trick. It would be great if I could use objects instead of iframes to do the same trick, but there are two problems. 1) objects are completely broken in IE 2) Changing the data of an object doesn't cause it to automatically reload in Firefox. I can deal with my site being broken in IE, if need be. But in order to use objects, I need to know how to cause Firefox to reevaluate the data. So that would also be a good answer to the question posed in this post. I have seen one method of reloading objects that clones objects with new data and replaces, but that doesn't work. In order to register with the history, I believe it must be the same object. But since I can't get Firefox to reload, I don't even know if that will register with the history. So once again, what I'd really like to know is, how can I use Modularization of XHTML to mix the IFrame Module and the other modules in XHTML 1.1? ~Viz
Thu Jan 11, 2007
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Websites and Web Designing
Author: FirefoxRocks Total-Replies: 0 This is a free lesson of XHTML provided by FirefoxRocks. After successfully completing your course of XHTML, you will be able to:
What is HTML? HTML is a language that is read by Internet browsers. It tells how browsers display the webpage. HTML files must have the .html extension, although very old pages do use the .htm extension. HTML stands for HyperText Markup Language. You are probably using Internet Explorer right now. To view the HTML for this page that you are reading, follow these steps:
What is XHTML? XHTML is a more stricter and cleaner version of HTML. In the future, XHTML will replace HTML. XHTML stands for eXtensible HyperText Markup Language. IF you learnt HTML before, converting to XHTML might be a tad difficult but shouldn't be too hard. Remember to read carefully on the lessons and to do each step and apply your skills. Practise makes perfect! Next section coming up soon!
Mon Oct 30, 2006
Reply New Discussion
Posted in Computers & Tech / Designing / Web Design and HTML
Author: Levis Total-Replies: 7 Hey guys, I have not designed a website for over a year. My website is currently in constuction at http://geekfromtheforest.com/ Anyways i am able to code in strict and traditonal xhtml 1.0 but do not know how to properly code a flash object. So let see if someone can come up with a proper way to code a flash object. This is what Macromedia recs but its dirty dirty and pointless and not valid! lol CODE<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="794" height="128" title="Geek From the Forest"> <param name="movie" value="/flash/logo/logo.swf" /> <param name="quality" value="high" /> <embed src="/flash/logo/logo.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="794" height="128"></embed> </object> Does anyone have any ideas how to get around this? [
Fri Dec 22, 2006
Reply New Discussion
Posted in Computers & Tech / Search Engines / Google
Author: sid.calcutta Total-Replies: 13 It is told that valid HTML code is the 'right' way to build website. It is also said that valid HTML allows for greater accessibility, cross-browser compatability, and might effect search engine rankings. I have got a link wherein you can validate your site for right HTML. It is here.This is the W3C Markup Validation Service, a free service that checks Web documents in formats like HTML and XHTML for conformance to W3C Recommendations and other standards.
Thu Mar 23, 2006
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Programming / HTML, XML and other Markup Lan..
Author: mastercomputers Total-Replies: 13 Allow for alterations Well, I've just had to convert another HTML 4.01 Transitional website over to XHTML (eXtensible HyperText Markup Language) 1.0 Transitional, I will later on convert over to XHTML 1.0 Strict as soon as I write the CSS (cascading stylesheet) file for it but it had to be a quick update and removing all presentational elements and placing them in a CSS file is not quicker than just altering some tags. So this is where I got the idea to write a How to Convert HTML over to XHTML. Let's begin I'm having trouble knowing where to start so let's write us a valid HTML 4.01 Transitional page with most elements that require alterations (purposely made mistakes) and then I can explain how we can fix it up so it will be a valid XHTML 1.0 Transitional page. CODE<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML> <head> <title>HTML Basic</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <base href="http://localhost"> <link rel="stylesheet" type="text/css" href="/style.css"> </head> <body bgcolor="#FFFFFF" link="#003399"> <hr> <form method="post" action="/cgi-bin/script.cgi" name="Script"> <table border=0 cellspacing=0 cellpadding=2 align="center" width= "95%" summary="Script Entry Form" height="44"> <tr> <td height="44" colspan="2"><img src="script.png" width="142" height="28"></td> </tr> <tr> <td width="66%">Fill in the script entries. After you submit your entry, you will be returned. <br> The * mean required fields.</td> <td width="34%" align="right"> </td> </tr> <tr> <td colspan="2"> <table border="0" cellspacing="1" cellpadding="4" width="95%" summary="Time for Input"> <tr> <td bgcolor="#EFEFEF" width="179">Input* :</td> <td bgcolor="#EFEFEF" width="460"><input type="text" name= "inputtext" size="40" maxlength="40"></td> </tr> </table> </td> </tr> </table> </form> </body> </HTML> So here's our base HTML file, so how do we go about altering it so that it's a valid XHTML 1.0 Transitional file. Let's start from the top. The first line which is recommended by W3C should be the XML processing instruction line so let's add that. CODE<?xml version="1.0" encoding="iso-8859-1"?>Next we will have to update our Document Type to reflect XHTML 1.0 Transitional. So that means we need to alter it CODE<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> This is the order it should go in, for HTML it use to be doctype comes first, but for XHTML the processing line is first, then doctype. Next we alter the <HTML> tag, because XHTML is based on the combination of XML and HTML, the rules really reflect the combination of them both. XML requires that there has to be one root element for a document. In XHTML, all tags should be enclosed within the <HTML> tag, since this is the root element for the document. Now to alter <HTML> CODE<html xmlns="http://www.w3.org/1999/xhtml" lang="EN">xmlns is the attribute for XML namespace. We associate XHTML documets with it. The attribute lang is for the language of this document. All XHTML tag elements and attributes should be in lower case. That means <HTML> should be rewritten as <html> and same with the end tag </HTML> should be </html> so now fix that. Next we will fix up empty tags, in XHTML empty tags should be ended with /> The empty tags in our HTML that needs fixing up are: <meta> tags to <meta /> <base> tag to <base /> <link> tags to <link /> <hr> tags to <hr /> <img> tags to <img /> <br> tags to <br /> <input> tags to <input /> We should have been finished with it, but I left in some other problems. Here's some more rules: XHTML attribute names should also be in lowercase as well as all attribute values should be inside quote marks. The first <table> tag, I left out the quote marks for some of the values, this is still valid HTML but not valid XHTML as XHTML states we should enclose all values in quotes, so do that now. Another problem, with the first <table> tag, XHTML don't not support the attribute height within the <table> tag, so we will cut it from there and add it onto our next <td> tag, since that supports the height attribute. One more problem, It is mandatory (absolutely needed) that we have the alt attribute for any image we have on our site, this is to help those who use text-based browsers, or other browsers that help our disability comrades to enjoy our sites too. So now fix our img tag to have an alt attribute, I will be calling it Script Logo, another thing, which is not a problem but should be considered is having a summary for every table we make, again to help others enjoy our site better. It's much appreciated if we do this. Last but not least, the name attribute is being deprecated (slowly wiped out) and it's replacement is now going to be the attribute id, what we do now is we search for whole words with exact case "name" and replace it with "id", that was our last step. Now our site should be fixed up and what we now have should look like this CODE<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> <head> <title>HTML Converted to XHTML</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <base href="http://localhost" /> <link rel="stylesheet" type="text/css" href="/style.css" /> </head> <body bgcolor="#FFFFFF" link="#003399"> <hr /> <form method="post" action="/cgi-bin/script.cgi" id="Script"> <table border="0" cellspacing="0" cellpadding="2" align="center" width= "95%" summary="Script Entry Form"> <tr> <td height="44" colspan="2"><img src="script.png" alt= "Script Logo" width="142" height="28" /></td> </tr> <tr> <td width="66%">Fill in the script entries. After you submit your entry, you will be returned. <br /> The * mean required fields.</td> <td width="34%" align="right"> </td> </tr> <tr> <td colspan="2"> <table border="0" cellspacing="1" cellpadding="4" width="95%" summary="Time for Input"> <tr> <td bgcolor="#EFEFEF" width="179">Input* :</td> <td bgcolor="#EFEFEF" width="460"><input type="text" id= "inputtext" size="40" maxlength="40" /></td> </tr> </table> </td> </tr> </table> </form> </body> </html> Both of these HTML and XHTML should validate as valid Transitional documents using the validator over at W3C, you can check it for yourself. Well that's it for me, just remember all the keys and rules and you'll have no problem with the transition. Cheers, MC
Thu Sep 16, 2004
Reply New Discussion
Posted in Computers & Tech / Designing / Web Design and HTML
Author: mastercomputers Total-Replies: 8 I am quite disappointed in IE's development as with keeping up but still if they feel they need to fully work on current things that they have already attempted to resolve and perfect then that is a good thing, but development should have never got so messy and only the developer would know that it's his fault and not MS's. This isn't to bad mouth IE, but it's so sad to know that even after 5 years or more of IE6, IE7 has no intention of supporting XHTML and I don't think I can wait for IE8 if development takes such a long time. They should also realise that HTML will become obsolete but it would be IE who would be successful in making that happen rather than Web Designers/Developers. So for this thread, XHTML is not just about changing tags and passing the W3 Validator, in fact the validator has it's limits and we know what limits it has, and we can rectify the situation. I'm talking about XHTML 1.1, although this does apply to XHTML 1.0 Strict and most definitely would apply to XHTML 2.0 yet this is still in draft. When designing your site, you should make sure you pass the validator, http://validator.w3.org/detailed.html (you should check most those check boxes for this test). But that's not all, to be 100% compliant the mime-type that an XHTML document must pass is application/xhtml+xml , in XHTML 1.0 they let it slip by for text/html but only if compatibility was the issue, however you should if you can send application/xhtml+xml to User Agents who can parse XML and as a backup send application/xml or text/xml or as a last and final backup text/html but eventually it will need to be resolved. I hate trying to fight for standards against people who believe they follow standards, I don't know how many web developers/designers have read nearly every document in W3C, I know I haven't read everyone, but I've read most of them related to HTML, XML, XHTML, CSS, XSL/XSLT and even this effort I have taken to has already surpassed most web designer/developers, so I rather not fight and just let people know that it's how the standards were set. If you understand this, then you'd probably want to know the advantage of XHTML 1.1 application/xhtml+xml. I have to say the biggest advantage is "well-formed", it's forced upon you, you make one mistake, it's not going to show your site, it will however show you the XML parser error and will not give you an excuse for making mistakes. This is what I consider the greatest debugging method I have when writing sites, as validators can not give this much power in validating. Other advantages are you can make your own tags, elements, etc, you are not stuck in using HTML tags no more, you can make tags, styled to how you want, which means you can make better use of CSS if you wanted to as you could create tags for each and every instance, e.g. replacing <p class="copyright">Copyright © 2005.</p> with something that has better meaning for it. e.g. <copyright>Copyright © 2005</copyright> There are many more advantages, but so much to explain. The main point is we're using data and making the data more appropriate and thus far more effective, especially for Search Engines and searches made. The biggest disadvantage, the most used browser under windows does not support it. I heard though that same browser on Mac does, is that strange or what? What we are forced to do with current situations is discover which browsers support it and work with them, we also need to know of other User Agents who definitely support it and work with them, there's so much of making workarounds for it, that I'm quite sick in the slow progress that has been taken to standards, these standards have been out for years now. Thanks to Mozilla and Opera and the other browsers (Camino, KHTML, etc) who better support standards and know the importance of keeping up to date. As for sending application/xhtml+xml We have many methods, but we should not need workarounds, because I find I have to even work on the workaround to perfect it even more so here's the simplistics of getting it working inside PHP. Headers must be sent first, so make it appear at the top/start of your page. CODE<?php if(isset($_SERVER['HTTP_ACCEPT'])) { $http_accept = $_SERVER['HTTP_ACCEPT']; if(stristr($http_accept, 'application/xhtml+xml')) $mime_type = 'application/xhtml+xml'; elseif(stristr($http_accept, 'application/xml')) $mime_type = 'application/xml'; elseif(strstr($http_accept, 'text/xml')) $mime_type = 'text/xml'; } else $mime_type = 'text/html'; header('Content-Type: ' . $mime_type); ?> This is only the basics of it, there's more since validators/search engines etc don't use HTTP_ACCEPT which means we must work on the HTTP_USER_AGENT instead which means sifting through hundreds and that is why I'm sick of not being able to just send application/xhtml+xml without blocking anyone from using it, even though I do feel like blocking IE just cause I can but that's not fair on my viewers. I may build some test sites for those who want to test their browsers, it would be nice to get some feedback so I might also allow for comments to be made on that site. I will be collecting some information from the use of it however, nothing other than things that will help me better improve on supporting all browsers and then helping you share my results and fixes for it. I'll get back to this when I've completed that part of the site. I will show you plain html files (written in XHTML) that pass W3C, as well as errored html pages (won't validate at W3C) that still display in the browser when they shouldn't (this is because browsers love to fix your problems instead of telling you there's a problem), in xhtml it will be same, but this time instead of the browser fixing your problem, it will tell you! That way you will be a better developer/designer knowing that if you met "well-formed" documents then no doubt you have made the effort to be error free. Give me time as I'm still trying to see if I can edge on the developer for IE to try for supporting this mime-type yet it seems there's too much to "hack" that it's best to not touch it when it's near releasing. I understand that people don't want a messy hack, well if they paid attention, he already messed up (if you think this is just a lie, I can point you to sources of him admitting it) and that's why IE requires a rewrite in that department, so messy hack or not, it was already a mess. There will no doubt be a patch to work with this, I even considered writing one myself, but I felt unofficial patches and the fact that it infringes on something is not worth it, lets just get them to fix the problem themselves. Also to do this patch, it's not an easy task, so don't think I'm making it sound easy, it is indeed a lot of work. So hopefully this will make you realise that standards are strict as hell, but well worth it. http://www.w3.org - The only site that has it all. Although you should be quite technical as it's how they speak there and not for those who need basics, basics are left up to us to help you will fully grasp it and we will teach you correctly, or as correct as we understand those documents at W3C. I do have to say though, it's due to us not following W3C as fully as we can that we messed up in the designing/developing side of things. Cheers, MC
Tue Oct 11, 2005
Reply New Discussion
Posted in Computers & Tech / Designing / Web Design and HTML
Author: shotwebmx Total-Replies: 0 Whether you're building a sophisticated commercial Web site or just creating an online spot to call home, good Web site development is about a lot more than just HTML nowadays, and Creating Cool Web Sites spends lots of time exploring the nuances of xhtml and Cascading Style Sheets in a way you're sure to understand. Incorporating the best of Creating Cool HTML 4.0 Web Pages and Dynamic HTML Weekend Crash Course, this book adds tons of critical new and updated information on xhtml, CSS, JavaScript, page validation, weblogs and weblog tools, optimal search engine ranking and much, much more. DOWNLOAD: http://vexard.no-ip.info/avaxhome/1/Creati...TML.and.CSS.pdf
Fri Sep 17, 2004
Reply New Discussion
Posted in Computers & Tech / Designing / Web Design and HTML
Author: FirefoxRocks Total-Replies: 8 I have a Java Applet for a chat room that is using the <applet> tag. It looks like it was from HTML 3.2 but I am using XHTML 1.1 (application/xhtml+xml), so I have to use the <object> element. For now I have forced that page to load as XHTML 1.0 Transitional in text/html MIME type because I don't know how to fix the problem. I have tried many suggestions from many sites but they don't work in Firefox, Internet Explorer or Opera (some of them are IE-only but they still don't work in IE). Is there any way that the <object> element can be implemented with cross-browser compatibility? I thought it would be as easy as <object> for Flash, but I guess not.
Sat Apr 28, 2007
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Websites and Web Designing
Author: FirefoxRocks Total-Replies: 4 Converting from HTML 4.01 Transitional (Loose) to XHTML 1.0 Transitional Many of you who write HTML are probably writing HTML 4.01 Transitional. This includes all of the deprecated elements and attributes such as <font> and bgcolor=””. This tutorial will cover how to convert from HTML 4.01 Transitional to XHTML 1.0 Transitional. The main reason here is for cleaner code. This tutorial does not cover why XHTML is better or worse than HTML. You can Google that for more information if you wish. 1. Add a document type declaration. This is the first step to being valid. If your document has an existing document type declaration, it should look like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> It should be the very first line in your document. If you have that line, replace it with: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> If you did not have any of those lines before then please add it to the top. 2. The <html> tag needs the xmlns attribute. You may have something like <html> in your document. It needs to become: CODE<html xmlns=”http://www.w3.org/1999/xhtml”>It is also a good idea to add the language of the web page to the <html> tag. Therefore, you can use: <html xmlns=”http://www.w3.org/1999/xhtml” lang=”en-CA” xml:lang=”en-CA”> en-CA is for Canadian English. Use the appropriate language code for the web page in the lang and xml:lang attributes. You can find a list of language codes here. 3. The optional HTML structure tags have to be added. If you do not have <html>, <head>, <title> and <body>, they need to be added at the appropriate places in the document. Also they need to be closed properly. The last line of your HTML document should always be </body></html>. 4. Some tags are now self-closing. In HTML, some tags are considered “empty” and did not need closing tags. In XHTML, all tags need to be properly closed. These tags are self-closing in XHTML: <area>, <base>, <basefont>, <br>, <hr>, <input>, <img>, <link>, <meta> Self closing means adding a slash inside the tag to close it off. Examples of this: <hr> becomes <hr /> <link rel=”stylesheet” type=”text/css” href=”styles.css”> becomes <link rel=”stylesheet” type=”text/css” href=”styles.css” /> <meta name=”keywords” value=”xyz”> becomes <meta name=”keywords” value=”xyz” /> 5. Alternate text in images is now mandatory. Some of you may still specify images without any alternate text. This is bad practice as screen readers will not know what the image is, also there will be nothing (or an X) shown when the image cannot be loaded (e.g. broken URIs, users turning off images, etc.). This is easy to fix: <img src=”dogs.jpg” /> becomes <img src=”dogs.jpg” alt=”Dogs playing in my yard” /> If for any reason the image does not need any alternate text (e.g. decorative images), you can just use alt=””. However, decorative images should really be specified in CSS, but that’s another tutorial. 6. Tags and attributes must be lower case. Older HTML books and tutorials may have specified tags in uppercase letters. In XHTML, all tags must be written in lowercase letters. <TABLE BORDER=”0” RULES=”rows”> because <table border=”0” rules=”rows”> 7. Attribute values must be quoted. In HTML, you didn’t need to quote attributes that had values containing only letters, numbers, dots (periods) or hyphens. In XHTML, all attribute values need to be quoted. <th scope=row> becomes <th scope=”row”> It doesn’t matter if you use single quotes or double quotes but if the value contains a certain type of quote then you must use the opposite type to quote the value. In this example, you can only use double quotes because the value contains an apostrophe: <p title=”Don’t touch that”> Similarly in this example, you can only use single quotes because the value contains a quotation mark: <p title=’Exponential “growth” pattern’> 8. Minimized attributes need to be rewritten in the non-minimized form. These attributes can be minimized in HTML: compact, checked, readonly, disabled, selected, defer, ismap, nohref, noshade, nowrap , multiple, noresize To write proper XHTML, you need to do this: <input type=”checkbox” checked /> becomes <input type=”checkbox” checked=”checked” /> <select multiple> becomes <select multiple=”multiple”> <script type=”text/javascript” defer> becomes <script type=”text/javascript” defer=”defer”> There is nothing wrong with using the full version of a minimized attribute in HTML 4.01. 9. Encode special characters. These characters should be encoded in HTML: < > & and “ If you use special characters within the text of your HTML, they may not display properly because they have special purposes in HTML. They should be written as: < < > > & & “ " 10. Don’t use embed, blink or marquee. When you “embed” Flash content, you may use the <embed> tag. This is wrong, you should use the object tag, like this: <object type=”application/x-shockwave-flash” data=”someMovie.swf” width=”640” height=”480”> <param name=”movie” value=”someMovie.swf” /> </object> <blink> has been replaced by CSS, it was never really a valid tag. <marquee> is something that I think should never be used, but if you wish, use a JavaScript equivalent of <marquee>. There is a marquee module in CSS 3, but at this time that hasn’t been released yet nor is it supported in any browser. 11. Paragraphs, list items and table cells need to be closed. When you were writing HTML, it was perfectly fine to write this: <p>Paragraph 1. <p>This is a new paragraph Or this: <ul> <li>Item 1 <li>Item 2 </ul> Or even this: <tr> <td>Cell 1 <td>Cell 2 </tr> But in XHTML, all tags need to be closed. Therefore: <p>Paragraph 1.</p> <p>This is a new paragraph</p> <ul> <li>Item 1</li> <li>Item 2</li> </ul> And this: <tr> <td>Cell 1</td> <td>Cell 2</td> </tr> 12. Validate. Validate your page at http://validator.w3.org/. If you have any other errors, either post here or learn how to fix them. The more valid pages you produce, the better you’ll get at it. Also, with writing valid XHTML 1.0, it is easier to see the code especially if you have an editor which supports syntax highlighting (e.g. Notepad++, HTML-Kit, gedit, and other bigger development software IDEs such as NetBeans) I may write future tutorials on how to convert from Transitional to Strict or from XHTML 1 to HTML 5 but I hope this helps clean up your pages a little.
Sun Dec 27, 2009
Reply New Discussion
Posted in Computers & Tech / Designing / Web Design and HTML
Author: chansard Total-Replies: 2 HTML-Kit is a full-featured editor designed to help HTML, XHTML and XML authors to edit, format, lookup help, validate, preview and publish web pages. Despite its name and the light download size, HTML-Kit is a multi-purpose tool that has support for several scripting and programming languages. Newcomers to web page design can benefit from letting it point out errors and provide suggestions on how to create standards compliant pages. Experts can save time spent on common tasks using the highly customizable and extensible integrated development environment while maintaining full control over multiple file types including HTML, XHTML, XML, CSS, XSL, JavaScript, VBScript, ASP, PHP, JSP, Perl, Python, Ruby, Java, VB, C/C++, .NET C#, Delphi / Pascal, Lisp, SQL, and more. HTML-kit
Wed Sep 15, 2004
Reply New Discussion
|