Working With HTML and XHTML In Dreamweaver

January 4, 2009 by Andrew Whiteman · Comment
Filed under: Web Development 

HTML is a simple markup language used to create documents designed to be accessed across the World Wide Web using browser software such as Internet Explorer or Firefox. The current version of HTML is known as XHTML, a stricter, rationalised version of the original HTML specification. One key fact to note about HTML and XHTML pages is that they describe the content and structure of the page rather than the position and presentation of the elements on the page.

The first significant difference between an HTML and XHTML page is the document type definition. There are several ways in which this specification can be done in Adobe Dreamweaver. One of the most convenient is to go to the Modify menu and choose Page Properties. Here, in the category marked Title/Encoding, one of the options reads Document Type (DTD).

There are a good few options available in the drop-down menu next to this setting, some relating to HTML version 4 and some to XHTML version 1. These DTD settings control the rules for the mark-up language so that the browsers can render the content correctly. For any new content you are creating, the best specification to choose is XHTML 1.0 transitional since it uses the current XHTML specification while allowing backward compatibility with slightly older browsers.

When looking at an HTML page, the structural content may not be immediately apparent. However Dreamweaver provides a number of useful tools for keeping tabs on the structure of your web page content. One of these is called the Tag Selector. Wherever the cursor is positioned, the HTML code relating to that part of the page is displayed in the bottom left of the page on the Status Bar in an area known as the Tag Selector.

When the browser reads the page, the tags that surround text and other elements tell the browser the structural importance of each element. The H1 tag, for example, tells the browser that a piece of text is a major heading. The H2 tag surrounds sub-headings, and so on. As these tags are displayed in the Tag Selector, you can get an idea of the structure of the page you are looking at and you can also click on the tags to select the element they contain.

Although the tags tell the browser the structural importance of each element, the HTML page doesn’t contain any information that helps the browser decide how each element should be displayed. This is the role of CSS (Cascading Style Sheets). An XHTML page is pretty similar to an HTML page. However, its syntax is stricter. Let’s take a look at some examples…

One example of this difference is that XHTML is case sensitive while HTML is not. In XHTML, all tags are lowercase so the H1 tag has to be written h1. In HTML, h1 or H1 can be used.

In XHTML, the closing tag cannot be ommitted: in HTML it is permissible to have an opening tag without a closing tag. One example of this is a horizontal rule (hr) which creates a dividing line between two sections on a webpage. This element is traditionally represented by a single tag, since it can never be used as a container. In XHTML, there is a special syntax for such elements: a single tag which serves as both an opening and closing tag (hr/). In HTML, a single opening tag is used with no closing tag (hr).

In summary, XHTML is the current version of HTML and this is the standard that should be used for any new projects. However, existing projects that you may inherit may well contain HTML code rather the XHTML. Therefore, it makes sense to be aware of both. Remember also that HTML and XHTML describe only the structure of web pages : neither of them should contain information regarding the display and presentation of this content. The appearance of web content should be specified using CSS.

About the Author:

Dreamweaver, HTML and XHTML

December 24, 2008 by Andrew Whiteman · Comment
Filed under: Web Development 

HTML is a markup language used to create web pages designed to be accessed across the World Wide Web using browser software such as Internet Explorer or Firefox. The version of HTML in current use is referred to as XHTML, a stricter, rationalised version of the original HTML specification. One important fact to note about HTML and XHTML pages is that they describe the content and structure of the page rather than the position and presentation of the elements on the page.

The first difference between an HTML and XHTML page is the document type definition. There are several ways in which this specification can be made in Dreamweaver. One of the simplest is to go to the Modify menu and choose Page Properties. Here, in the Title/Encoding category, one of the options reads Document Type (DTD).

There are quite a few options available in the drop-down menu next to this setting, some relating to HTML version 4 and some to XHTML version 1. These DTD settings specify the rules that the mark-up language must follow so that the browsers can render the content correctly. For any new content you may be creating, the best specification to choose is XHTML 1.0 transitional since it uses the current XHTML specification while allowing backward compatibility with slightly older browsers.

When looking at an HTML page, the structural content may not be immediately apparent. However Dreamweaver provides a number of useful tools for keeping tabs on the structure of your web page content. One of these is called the Tag Selector. Wherever the cursor is positioned, the HTML code relating to that part of the page is displayed in the bottom left of the page on the Status Bar in an area known as the Tag Selector.

When the browser reads the page, the tags surrounding text and other elements communicate to the browser the structural importance of each element. Thus, for example, the H1 tag tells the browser that a piece of text is a major heading, while the H2 tag signifies a sub-heading, and so on. When these tags are displayed in the Tag Selector, you can get an idea of the structure of the page and you can also click on any tag to select the element(s) it contains.

Although the tags tell the browser the structural importance of each element, the HTML page doesn’t contain any information that helps the browser decide how each element should be displayed. This is the role of CSS (Cascading Style Sheets). An XHTML page is pretty similar to an HTML page. However, its syntax is stricter. Let’s take a look at some examples…

XHTML is case sensitive: HTML is not. In XHTML, tags are always lowercase so the H1 tag has to be written h1. In HTML H1 or h1 can be used.

In XHTML, the closing tag of an element cannot be ommitted: in HTML it is permissible to have an opening tag without a closing tag. One such example is the horizontal rule element (hr) which creates a dividing line between two sections on a webpage. This element is represented by a single tag, since it can never be used as a container for other stuff. In XHTML, there is a special syntax for such non-container elements: a single tag which is both an opening and closing tag (hr/). In HTML, the single opening tag is used without the need for a closing tag (hr).

In summary, XHTML is the current version of HTML and this is the standard that should be used for any new projects. However, existing projects that you may inherit may well contain HTML code rather the XHTML. Therefore, it makes sense to be aware of both. Remember also that HTML and XHTML describe only the structure of web pages : neither of them should contain information regarding the display and presentation of this content. The appearance of web content should be specified using CSS.

About the Author:

Top 3 New Features in Dreamweaver CS4

November 4, 2008 by Andrew Whiteman · Comment
Filed under: Web Development 

1. Photoshop Smart Objects

HTML is a notoriously sparse environment which relies on files created with other technogies to add functionality to web pages. Typical examples of related files are server-side includes, CSS, JavaScript and XML. Dreamweaver now includes a feature called “Related Files” which enables you to edit the content of such files, without having to open them separately, and to instantly see the effect of your changes on the main file.

Photoshop images are can be inserted using the same techniques as inserting any other image file: Insert - Image; dragging from the Files panel; dragging from the Assets panel; or using the Insert toolbar. A Photoshop-style Optimise window automatically appears and you can choose the settings appropriate for that particular image usually GIF, JPEG or PNG.

Once the image has been imported, an icon is displayed in the upper left of the image indicating that it is a smart object. Also, in the Property Inspector, the location of the original PSD file is shown in a box marked “Original”.

The fact that the image is a smart object means that if we resize it in Dreamweaver, it will automatically be re-optimised and a new version of the image will be generated with the new dimensions. (In previous versions, resizing an image would mean that the browser was responsible for resizing leading to poor image quality.

Photoshop images are can be inserted using the same techniques as inserting any other image file: Insert - Image; dragging from the Files panel; dragging from the Assets panel; or using the Insert toolbar. A Photoshop-style Optimise window automatically appears and you can choose the settings appropriate for that particular image usually GIF, JPEG or PNG.

Once the image has been imported, an icon is displayed in the upper left of the image indicating that it is a smart object. Also, in the Property Inspector, the location of the original PSD file is shown in a box marked “Original”.

The fact that the image is a smart object means that if we resize it in Dreamweaver, it will automatically be re-optimised and a new version of the image will be generated with the new dimensions. (In previous versions, resizing an image would mean that the browser was responsible for resizing leading to poor image quality.

3. Related Files

The Property Inspector can be used to change the attributes of any element you select on an HTML page. In previous versions of Dreamweaver, changing the attributes of highlighted text would cause the program to create CSS classes with names like “Style1″, “Style2″, etc. in the head area of the current page. This random creation of styles was often responsible for getting new web developers into bad habits.

Whenever you open a file which contains linked files, Dreamweaver displays each of the linked files in the Related Files Bar. To access a related file just click on its name. If you make any changes to a related file and asterisk appears next to its name in the Related Files Bar to remind you to save your changes. When you do, the impact of the changes is immediately visible in the main file.

About the Author:

Enjoy sweet success when working from home with RACsuccess

In these times of high energy prices, along with wages that just don’t quite cover everything we need; many people are looking for alternative ways, to either save money or make extra money, to ease the pinch at the pump. The media has been full of news about people who used to commute long distances trying to save gasoline costs by working at home instead, or by adopting the four-day work week which gives them an extra day of spare time for earning extra money. And many have taken advantage of that extra free time by getting into the freelance business. They have discovered that online freelance work, as either a coder or a buyer, is the alternative answer they were looking for.

Many people have found that Rent A Coder (RAC) is one of the best websites out there and they can earn good reliable income from there. Many coders bid on projects and buyers accept them and then they start working on the projects. Other’s hire coders and they get their projects complete. There are a lot of buyers out there requesting projects that need people just like you that have technical or programming abilities. Distance is not a problem here because Rent a Coder connects people from all across the globe and many coders find these service of great help in order to get a good income.

But now, here is the thing. Many of these coders didn’t become successful just like that. They actually found a chest of gold that gave them that guidance to become so successful. They found about a company called RACsuccess which offers them a lot of free gifts. On RACsuccess, you get access for free to a complete video tutorial library on how TO USE Rent a Coder. These is for people who still don’t know anything about Rent a Coder and RACsuccess wants to get them started. That’s just the beginning, they also have lots of other services such as testimonials from other successful people, monthly contests, a free affiliate program that you can join to earn even more money. There is also a community forum where you can share your experiences or request help from someone else.

So if you really want to learn the tricks of a successful person when it comes to bidding on projects or when it comes to attracting only the good coders, RACsuccess has also an amazing package of videos and very informative guides that gives you deep insights on how to really succeed in Rent a Coder. This package is not only for beginners, is an official Rent a Coder tool and teaches you tricks and tips that you really need to know!

That’s why RACsuccess was created, they want people to hire the most suitable coders for their projects and they want coders to really be successful in landing projects in Rent a Coder and how to deal better with people. RACsuccess wants everyone to feel happy about working from home by seeing positive results while working in Rent a Coder. RACsuccess is that company that is supporting so many coders and buyers of Rent a Coder already.

Luis Lazo who is a very experienced coder started with the idea of RACsuccess and after the approval of Ian Ippolito who is the owner of Rent a Coder, he decided to make a big step on the way freelancing is often look and approached. He shared all his knowledge on how to succeed in Rent a Coder by creating more than 40 videos and two guides through which he shares all his experience. This is experience from which any coder and buyer that works in Rent a Coder can benefit from.

The RACsuccess package is often seen as a tool for “babies” but actually the RACsuccess package contains ALL the information anyone would need to know in order to succeed in Rent a Coder. Whether the person is experienced or just a “newbie”, the RACsuccess package is meant to make a huge positive difference in the way they work as coders and buyers in Rent a Coder!

So if you are either a coder or a buyer on RAC, and if you are finding yourself not winning as many bids as you would like, or not attracting the quality coders you know you deserve, then you just may be up against competitors that have already tapped into the resources available in the RACsuccess package.

About the Author:

Using Dreamweaver To Add JavaScript To Your Web Pages

September 25, 2008 by Andrew Whiteman · Comment
Filed under: Web Development 

JavaScript is a well-established scripting language which creates code that can execute both an HTML page loads and after it has loaded. It is very efficient since it can run independently on the computers of the visitors to your web site. Thus freeing up your server to do other things. It is so widely used on web sites that, though it is possible for a user to disable JavaScript within their browser settings, most people will need to leave it active if they are to interact with the sites they visit. Adobe Dreamweaver allows web developers to add JavaScript to their pages by using what it refers to as “behaviors”.

A behavior is simply a pre-written JavaScript function which can be triggered by a given event. To make the Behaviors window visible, choose Behaviors from the Window menu. Next select the element to which you want to attach the JavaScript. Finally, choose one of the available behaviors from the menu in Behaviors window. (The behaviors which are available will depend on the item you have highlighted.)

Dreamweaver attempts to guess the event that you would like to trigger the behavior such as an onMouseOver, onClick or OnDoubleClick. If it guesses the wrong event, simply choose the correct event from the drop-down menu next to the name of the event.

Dreamweaver contains several types of JavaScript behaviors. Some relate to images, others display windows and messages, others can be used on forms and form fields and still others can be used to manipulate CSS attributes. To get a flavour of how behaviors work, let us examine a behavior in each of the above categories.

Perhaps the most frequently encountered JavaScript function is one that changes the appearance of an image when the mouse passes over it. Dreamweaver creates this functionality with the “Swap Image” behavior. You can also add this behavior automatically by choosing Insert > Image Objects > Rollover Image. Dreamweaver automatically adds a second behavior/function called “Restore Image” which changes the image back to the original when the mouse leaves the image.

In the alerts and windows category, we have Dreamweaver’s “Open Browser Window” behavior. This creates the ever-popular pop-up window. When you assign the behavior, Dreamweaver asks you to choose the HTML page you would like displayed in the window as well as the attributes you would like to add or suppress, such as scroll bars or the ability to resize the window.

In the form manipulation behaviors category, we have “Set Text of Text Field” and “Validate Form”. The “Validate Form” behavior only applies to text fields and enables you to ensure, first of all, that a field has not been left blank; secondly, that a field contains a valid email address; thirdly, that a field contains a numeric value; and, fourthly, that a field contains a number within a given range.

Dreamweaver has a number of behaviors which can be applied manipulate the CSS attributes associated with a given page element. One such behavior is Show/Hide Elements. This enables you to make the content of an HTML element visible or hidden based on an action performed by the user. You can apply this behavior to the content of an H1, DIV, P(aragraph) basically, any element that can contain stuff.

Each behavior that you choose will create one or more JavaScript functions within the head area of your page. Part of the process of optimising your website (both in terms of accessibility and search engine compatibility) is to transfer this code to an external JavaScript file and then link the web page to the JavaScript file. To do this, you need to be in Code view and locate the function(s) generated by the behavior(s) you have used on your page. Cut all of the code between the opening and closing SCRIPT tags and place it in a text file which needs to be saved with a .js extension. Next, enter an src attribute inside the opening SCRIPT tag, for example .

About the Author:

Next Page »