To create a Library item, start by opening the Library window. Choose Window Assets, and click the Library Items button (it looks like an open book, circled in Figure 16-4) to reveal the Library category.
Now select the part of your document that you wish to save as a Library item: a blob of text, a graphic, or whatever.
Note, however, that Library items can contain only page elements that appear in the document windowin other words, only HTML from the <body> of a Web page. You can't include anything that appears in the <head> of a page, like Cascading Style Sheets, Dreamweaver Behaviors (Chapter 11), or meta tags. Furthermore, Library items must include a complete set of HTML tagsboth an opening and closing tagas well as all tags necessary to complete the original object. For example, Dreamweaver doesn't let you turn just a single cell , row, or column of a table into a Library item. If you try, Dreamweaver adds the entire table to the Library.
Next , add the selection to the Library. As you may expect, Dreamweaver provides several ways to do this:
Drag the highlighted selection into the list of Library items.
Click the New Item button (Figure 16-4).
Choose Modify Library Add Object to Library.
The new item appears in the Assets panel, bearing the jaunty name "Untitled." Just type to replace that with a more useful name , such as Copyright notice or Logo . (Avoid hyphens in your Library item's name. These tend to trip up the Firefox Web browser, as described in the box on Section 16.7.1.) Your new Library element is ready to use.
To add a Library item to a Web page, drag it directly out of the Assets panel's Library items listing onto your page. (The long way: Click to plant your insertion point in the Web page, click the Library item you want in the Assets panel, and then click the Insert button on the Assets panel, shown in Figure 16-4.)
When you insert a Library item into a Web page (or turn a selected item into a Library item), it sprouts a light-yellow background color . The highlighting indicates that Dreamweaver intends to treat the Library item as a single object, even though it may be made of many different HTML elements. You can select it or drag it around, but you can't change it. (Unfortunately, if you turn a nontransparent graphic into a Library itemlike a logo, for exampleDreamweaver doesn't give you this helpful visual cue.)
Remember, too, that the placed Library item is linked to the original copy in the Library. The copy in your document automatically changes to reflect any changes you make to the copy in the Library, using the technique described next.