HTML vs. XHTML – How to Convert HTML to XHTML

XHTML 1.0 is a reformulation of HTML 4.0. What this really means is that learning XHTML is basically the same as learning HTML. The main difference is a few simple rules – as XHTML is more strict than standard HTML.
The reality is that HTML is not going away. While there are many advantages to having a very flexible system where tags can be easily added and changed in the DTD, but most Web Developers won’t need or want their own tags. Why rewrite the way the <p> tag works, when it’s already in the document definition?

Converting an HTML Document

There are a few basic rules you need to apply to convert an HTML 4 document to XHTML.

  1. Stricter adherence to the HTML specification.

    Many browsers are very lax in how they interpret HTML. This leads to incongruities in how the pages are displayed, and XHTML doesn’t allow that. The best way to correct this is to use an XHTML validator.

  2. Write well formed documents.

    What this generally means is avoiding overlapping elements. The following nested code is acceptable:

    <p>Paragraph <em>emphasized</em></p>

    because the <em> tag is opened and closed within the <p> tag. However, this is not allowed:

    <p>Paragraph <em>emphasized</p></em>

    because the <em> tag overlaps the <p> tag.

  3. Write tags and attributes in lowercase.

    XHTML is a case-sensitive markup language, so

    <LI> and <li>

    are potentially two different tags.

  4. End tags are required.

    In HTML, some tags which actually contain elements do not require the end tag. The most common of these is the

    <p>

    tag. XHTML requires that the

    </p>

    tag be used. For singleton tags, such as

    <br>

    you should include a trailing slash in the tag itself, e.g.

    <br />

    to get a line break.

  5. Attributes must be quoted and include values.

    What this means is that non-quoted attributes such as

    <table border=3>

    are invalid. And attributes which used to stand alone, must now be written as name=”value” pairs. For example

    <hr noshade=”noshade” />

    adds the noshade attribute to the <hr/> tag.

  6. Do a second validation.

    The last step is to validate your XHTML again. This will tell you of any additional problems or issues with your code.

Copy from About.com. Published by Jennifer Kyrnin

The ways to create thumbnail image by php with thumbnail generators.

When you want to display an image into your web page, maybe you need to resize it, make it smaller than the original, such as the headline images, image which represents for a post…That’s all images are called Thumbnail. I’ll not say much about what thumbnail means in this entry, and not about how to make thumbnail image in PHP because it’s just a common skill that everyone who works with PHP can not live without. I just want to show you same useful code to make thumbnail that you dont need to do any coding…and maybe some people not know about PHP can do that easily. That all usefull tools (i dont know i use “tool” here is correct or not, just let me call it “tool”) below are Thumbnail Generators.

1. phpThumb()

phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly.  ImageMagick is used wherever possible for speed. Basic functionality is available even if GD functions are not installed (as long as ImageMagick is installed). It supports almost image formats or any image format ImageMagick can read. The output are, too and even ICO format.

Images can be rotate, cropped. Output is antialiased into the alpha channel where appropriate when PNG output is selected. Quality can be auto-adjusted to fit a certain output byte size.

This script support a large number of filters can be applied. It’s an excellent set of free PHP scripts which can process and generate thumbnails very easily.

2. Zubrag Thumbnail Creator / Generator

PHP Thumbnail Creator is designed to generate thumbnails from JPG, GIF, or PNG images. Script can save rendered thumbnail as file on your server or output it directly to the browser.  There’re nothing special from this tools, it’s just a normal thumbnail generator. It supports JPG, PNG, GIF image type but depends on GD2 library. You can customize default value from source code. Script can also help you if you need to show few thumbnails based on the same source image but in different sizes, when you cannot afford saving created thumbs on your server for some reason.

3. PHP Thumbnail generator with shadow


This one is simple, simple to use, but the main feature it supports is so amazing. It can drop soft shadows below the thumbnails. Because the simplified of this tool, it just support 2 image type: PNG and JPG. PNG transparency is allowed, but when IE Browser is not version 7 or above, it will be detected and convert to JPG format instead. Absolutely, it can save the images in server in cache folder like others can do.

4. TimThumb PHP Script of Tim McDaniels

Just a simple script but is the most useful tool people using. Make a thumbnail, crop size or not and the quality of output. Main feature is users dont have to do nothing, if users want to crop the image, it will automatically crop width size if width size is larger than the height or do the same with height. This tool is the most popular tool to create thumbnail image by WordPress users. It’s supports cache, too.

Support: JPG, PNG (Resize a PNG with transparency and you’ll get a white background), GIF (Reducing a GIF in quality will discard the transparency of the image, resulting in a black background)

5. Drop Shadowed Thumbnail Creator

This class allows you to very easily create thumbnails of images, on which you can also apply a drop-shadow effect. You can control the colour of the background so that drop-shadow will fit better onto your page and the size of the thumbnail.

You can resize in an absolute or relative way (to a certain size or by a certain size), both as a pixel number or a percentage.

6. jQuery easyThumb


jQuery easyThumb is a plugin for jQuery. The easy description is that it turns a list of full-scale images to a list of thumbnails on-the-fly. It uses a php-script to return a thumbnail for each image, and jQuery to generate the list. Let’s jump right to the installation.

Maybe you cant access the homepage because he is now hosting this script in a stupid host. Let try again later or try google with “jQuery easyThumb”, you can find some useful informations about this script.

Final words:

These all tools above is just make us feel quickly when working. If you are a web developer, you can download and add some function to. Because of creating thumbnail in PHP with GD library support is just a common skill with php programmer, so if you are new to PHP, want to work with image, you should take a look at GD Functions in php manual page.

5 basic steps to protect your hosting server

its very important to protect our website . so i thought to share this steps. here is some advices to follow….

1. Config your php.ini

safe_mode = On [This is optional, many open sources applications will not run properly]
fopen = Off
disable_functions = “apache_get_modules, apache_get_version, apache_getenv, apache_note, apache_setenv, disk_free_space, diskfreespace, dl, highlight_file, ini_alter, ini_restore, openlog, passthru, proc_nice, shell_exec, show_source, system”

Continue reading

Top 10 tips for high link popularity

Link popularity has become an important factor in the ranking algorithms of most search engines. If many quality web sites link to your site, you’ll have a good position in the search engines.

10. Cross-link your sites

    An easy way to improve your link popularity is to add a link from your own popular web site to a less popular site of your own.

    However, it’s very important that one site is not only a duplicate of the other and that both sites are related to each other. For example, CheckYourLinkPopularity.com .

    Continue reading

10 Free powerful Content Management Systems

Content Management Systems help web developers create, manage and publish quickly blogs, portal or social collaboration websites. Probably you know the most popular CMS tools such as WordPress, Movable Type, Joomla!, Mambo but there are a lot of similar CMS tools for all needs.

1. Frog CMS
Frog CMS simplifies content management by offering an elegant user interface, flexible templating per page, simple user management and permissions, as well as the tools necessary for file management.

Continue reading

How to find secret web site pages and content

Web site owner hide their webpages using commands in Robots.txt.Robots.txt is a text file which is located in the root directory of a site.It is used to control webpages  indexed by a robot,ie. you can disallow a particular web page or content to be spidered from search engine robots. By using ‘disallow‘ word you can block any URL of your blog from  reaching search engines.

We will take the help of Robots.text file to see the hidden web site pages and content
Continue reading

%d bloggers like this: