Archive for category (X)HTML

HTML Copyright Trademark Symbols

ASCII codes for copyright and trademark symbols in html.

© can be created with this:

©
® can be created with this:
®
™ can be created with this:
™

No Comments

HTML Code


HTML Codes, HTML Characters Special Charaters Table for reference of ascii characters and symbols in HTML format. With cross browser support:




1 Comment

Get ctp File Recognized in Dreamweaver

To get color code, syntax highlight style for ctp files in Dreamweaver is easy.

There are two dreamweaver configuration files you need to edit to make ctp files have HTML like color code and view in design view.

1. Edit the Extensions.txt file
Locate the Extensions.txt file within the Dreamweaver user configuration folder. The location of this folder depends on the operating system and the version of Dreamweaver:

* Dreamweaver CS3 on Windows Vista:
C:\Users\[username]\AppData\Roaming\Adobe\Dreamweaver 9\Configuration
* Dreamweaver 8 on Windows Vista:
C:\Users\[username]\AppData\Roaming\Macromedia\Dreamweaver 8\Configuration
* Dreamweaver CS3 on Windows XP:
C:\Documents and Settings\[username]\Application Data\Adobe\Dreamweaver 9\Configuration
* Dreamweaver 8 on Windows XP & 2000:
C:\Documents and Settings\[username]\Application Data\Macromedia\Dreamweaver 8\Configuration
* Dreamweaver CS3 on Mac OS X:
Mac HD:Users:[username]:Library:Application Support:Adobe:Dreamweaver 9:Configuration
* Dreamweaver 8 on Mac OS X:
Mac HD:Users:[username]:Library:Application Support:Macromedia:Dreamweaver 8:Configuration

2. Open Extensions.txt in any external text editor like Notepad or Text Editor. Do not modify the Dreamweaver configuration files in Dreamweaver itself.

3. You should be able to see a line similar to the one below:
HTM,HTML,SHTM,SHTML,HTA,HTC,XHTML,STM,SSI,JS,AS,ASC,ASR,XML,XSL,
XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX,ASMX,CONFIG,CS,
CSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,TPL,LASSO,JSP,JSF,VB,
VBS,VTM,VTML,INC,JAVA,EDML,WML:All Documents

4. Now add CTP to the end of the list just before the :All Documents, so now the new list should look like:

HTM,HTML,SHTM,SHTML,HTA,HTC,XHTML,STM,SSI,JS,AS,ASC,ASR,XML,XSL,
XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX,ASMX,CONFIG,CS,
CSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,TPL,LASSO,JSP,JSF,VB,
VBS,VTM,VTML,INC,JAVA,EDML,WML,CTP:All Documents

5. You have just added ctp file as a Dreamweaver document, the next step is to specifically define it as a HTML document. Search for the line: HTM,HTML,HTA,HTC,XHTML:HTML Documents

6. Now add CTP to the end of the list:
HTM,HTML,HTA,HTC,XHTML, CTP:HTML Documents

7. Now you have made ctp files recognizedly by Dreamweaver, the next step is to make the syntax color highlighted.

Locate the MMDocumentTypes.xml file in the main Dreamweaver configuration folder (not the Dreamweaver user configuration folder). The location of this folder depends on the operating system and the version of Dreamweaver:

* Dreamweaver CS3 on Windows Vista & XP:
C:\Program Files\Adobe\Adobe Dreamweaver CS3\Configuration\DocumentTypes
* Dreamweaver 8 on Windows Vista, XP & 2000:
C:\Program Files\Macromedia\Dreamweaver 8\Configuration\DocumentTypes
* Dreamweaver CS3 on Mac OS X:
Mac HD:Applications:Adobe Dreamweaver CS3:Configuration:Document Types
* Dreamweaver 8 on Mac OS X:
Mac HD:Applications:Macromedia Dreamweaver 8:Configuration:Document Types

8. Open MMDocumentTypes.xml in any external text editor like Notepad or Text Editor. Do not modify the Dreamweaver configuration files in Dreamweaver itself.
<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false">

9. Add the desired extension to the winfileextension and macfileextension attributes of the documenttype tag. For example:
<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml,ctp" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi,ctp" file="Default.html" writebyteordermark="false">

10. now after editing and saving the two files above, close and restart your Dreamweaver again, open a file with the extension .ctp and you should be able to see the color and formatting being recognized!

22 Comments

alt Tag tooltip on Firefox

If you are familiar with Internet Explorer and see the alt Tag text for images being displayed as tooltip, you may think the same tooltip will appear in Firefox too, well… the fact is that in Firefox, when you mouseover the image, you won’t see the tooltip. The reason is because the correct attribute is ‘title’ not ‘alt’. For instance, instead of writing alt=”screenshot”, you should write title=”screenshot”. Now the toolbox will display the word “screenshot” when you rollover the image.

Hope this helps!

11 Comments

IE6 HTML CSS div height Extra Space

When you set a HTML div element’s height and width using CSS, you may find that the height rendered on IE6 is not as you expected, it’s thicker than the value you defined. Below is an example:

When you render the following div element in IE6, you will realize that the result is far beyond your imaginaiton

<div style="width:20px; height:1px; background-color:black;">
</div>

The cause of the problem is that IE6 treat line-break as whitespace. So in order to solve this problem, you need to remove the line break, so the following HTML CSS code is the solution to solve the problem:

<div style="width:20px; height:1px; background-color:black;"></div>

,

11 Comments

Make HTML Elements Appear on Top of Flash Movie

When I was making a website for client that has a DHTML popup menu that pops up above the page body which’s a flash movie, I found the easiest way to do so was to set the wmode as transparent within the object tags in HTML that embed the swf (Flash Movie).

When you embed Flash movie in HTML, You will normally see the following two tags:

<object><embed></embed></object>

Now all you need to do is to insert the following tags and attributes to the existing code within the object and embed tags :

<object>
<PARAM NAME="wmode" value="transparent">
<embed wmode="transparent"></embed>
</object>

,

1 Comment

HTML 4.01 STRICT vs XHTML

Many developers who just started developing website find it’s hard to choose between HTML 4.01 STRICT and XHTML. If you know what each of them does, it’s not that hard at all to make a choice.

I prefer to use HTML 4.01 STRICT instead of the more modern XHTML.

The reasons are:

1. More browsers support HTML 4.01 STRICT, and it is as clean as XHTML when it comes to syntax. Real XHTML documents should be set as application/XML+XHTML and not as text/HTML on the server, once it’s set as application/XML+XHTML, the pages will not display in MSIE.

2. Once the most common browsers do support real XHTML, it won’t be hard to convert the documents. For now, 4.01 STRICT makes browsers display our documents as the W3C planned them to be displayed—well, most of them do.

3. You can still apply the XHTML rules in an 4.01 STRICT document, it will be rendered correctly. For example: you can write all the code tag in lowercase—as this is necessary for XHTML, but not necessary in 4.01 STRICT. (XML and XHTML are case sensitive, whereas older and lesser strict HTML versions like 4.01 STRICT aren’t.) So it will be easy to convert to XHTML once it’s supported by more browser agents.

So the conclusion is that we can always keep our document HTML 4.01 STRICT, but code it by following XHTML rules and specifications.

You can see many popular websites use HTML 4.01 STRICT, for example: Yahoo!, Google.

,

1 Comment