Additional steps are required to validate style blocks that are embedded in HTML documents, as the current version of the W3C CSS Validator requires a *.css file or a stand-alone stylesheet as input.
- Copy the CSS code to a new editor window
- Invoke the W3C CSS Validator
The following steps can be used to automate this process and reduce it to a single key press using HTML-Kit's keyboard customization feature:
- Select "Tools | Customize | Keyboard Shortcuts" from HTML-Kit's main menu.
- Click "Add" to create a new shortcut.
- Press a key combination (such as Ctrl+Shift+F5) or pick one from the list. The new command will be assigned to this key.
- Click "Menu command," pick "MTagGoToTagSTYLEStart" from the drop-down list and click "Add."
- Click "Menu command," pick "MSelectTagBlockStyle" from the drop-down list and click "Add."
- Click "Menu command," pick "MCopy" from the drop-down list and click "Add."
- Click "Menu command," pick "MNewDocumentClipboard" from the drop-down list and click "Add."
- Click "Action," pick "Online > W3C CSS Validator" from the drop-down list and click "Add."
- Click "OK" followed by another "OK" to save the new shortcut.
Now it's possible to validate the main style block in an HTML file by pressing Ctrl+Shift+F5 (or the assigned shortcut).