A bookmark is a region of text that has a unique name/id and acts as a target for a link--that is, the location to which the hyperlink links. See Hyperlinks. Bookmarks are a legacy word processing function and pre-date XML. They can begin and end at any location within a document and would therefore violate XML well-formedness if represented with typical XML begin and end tags. For this reason, a bookmark is not defined between begin and end tags. Instead, the beginning is defined by an empty element (bookmarkStart) and the ending is defined by an empty element (bookmarkEnd). The two tags together define a region through their common id attribute. A link to the bookmark then uses the value of the bookmark's name attribute as the value of its anchor attribute.
The bookmarkStart element has the following attributes.
Specifies a unique identifier for the bookmark. The value must match the value of the corresponding id for the bookmarkEnd element.
Specifies the bookmark name. The value of this attribute should match the value of the anchor attribute for the hyperlink element.
This attribute is used to define a bookmark that is within a table. If it appears, so must the colLast attribute. It is possible for a bookmark within a table to only cover cells within a certain column and row range by specifying the first row that is part of the bookmark, the first column of each row that is part of the bookmark, the last column that is part of the bookmark, and the last row that is part of the bookmark. The first row is specified by placing the beginning bookmark (bookmarkStart) in the first cell of the row. The last row is specified by placing the ending bookmark (bookmarkEnd) at the end of the row. The first column is specified with this attribute. And the last column is specified with the colLast, shown below. The attribute is a zero-based index of the columns, so the first column is represented by w:colFirst="0".
For example, a table of three rows and three columns might have a bookmark applied to the first two cells in the first two rows.
The bookmark indicated by blue shading above would be specified with the following:
<bookmarkStart w:colFirst="0" w:colLast="1" w:id="0" w:name="tableAnchor"/>
. . .
. . .
. . .
Specifies the zero-based index of the last column in the row which is part of the bookmark. If this attribute appears, so must the colFirst attribute. See the colFirst discussion, above.
The bookmarkEnd element has the following attributes.
Specifies a unique identifier for the bookmark. The value must match the value of the corresponding id for the bookmarkStart element.
Related HTML property: