|MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA|
Get Lean with GoLive 6
Creating Valid Markup
Looking at the source again, you'll see that GoLive is using a bunch of proprietary tags. For example, it's inserting a
In site Settings > Upload/Synch Times, there's an option to strip the HTML code of Adobe GoLive elements. If you have this option turned on, for every page you upload to your server, GoLive will remove all the proprietary tags. This means your page has a much better chance of passing any validation tests.
You can also choose to strip GoLive elements any time you use GoLive's incremental upload feature. When the Upload options box appears, click the button that says Strip Options and you can choose to remove the GoLive elements then.
Stripping out the GoLive elements is just one aspect of producing valid markup. GoLive has several other features that can help you achieve this.
What Is Valid Markup?
Valid markup is markup that passes the recommendations laid down by the W3C, the body that defines (X)HTML. The first important part of writing valid markup is to declare a DOCTYPE. DOCTYPE tells a browser what markup to expect. Including a DOCTYPE in your pages can save valuable processing time because the browser knows exactly what kind of markup to expect, and will display the page accordingly. GoLive helpfully allows to you to set the target DOCTYPE.
Pic 8. Setting the DOCTYPE.
There are two type of DOCTYPE statement -- long and short. GoLive provides the tools to handle both. To set the target DOCTYPE, select the flyout menu on the top right of your page and select DOCTYPE. By default, GoLive uses the shortened version of the DOCTYPE. For the long version, press Alt (Option) while selecting the flyout. If you'd like to read more about DOCTYPE then read this "Use the Right Doctype" article on the O'Reilly Network.
Pic 9. Example of the short DOCTYPE.
GoLive can also configure the object palette to conform to your chosen DOCTYPE. The configured palette will only display objects that are valid for your chosen version of (X)HTML. To configure the object palette, go to the flyout menu at the top right of the object palette, select Configure, and select a DOCTYPE version.
Once selected, GoLive will only show valid objects for your chosen DOCTYPE.
Pic 12. The Reduced Object Palatte.
GoLive has another trick up its sleeve when it comes to producing compliant markup: it can check your markup. Go to Edit > Syntax Check. Then set a DOCTYPE target. In the bottom pane of the palette, elements can be turned on and off. Doing this prior to a Strip Elements upload allows for a page with GoLive elements in it to be validated before uploading.
Pic 13. The Syntax Check window.
Once you hit OK, GoLive will scan your markup and check it. If there are errors, it will produce a report like the one below.
Pic 14. The error report.
Clicking on the error will take you to the error in your markup, as shown in the picture below.
GoLive now provides you with the tools to produce lean, efficient valid markup. Using them will benefit you and your client. And the next time your friend -- the die-hard hand coder -- tells you that GoLive produces bloated code and invalid markup, smile knowingly and think "Yeah ... Right!"
Derry Thompson is currently co-owner of GloDerWorks with his partner Gloria Hansen. An active participant in the GoLive community and an avid Mac user, he can be found in various airports using his Titanium G4 Powerbook.
Return to the Web Development DevCenter.