textAnchor property

Sets or retrieves a value that aligns a string of text relative to a given point.

 

Syntax

HRESULT value = object.put_textAnchor(BSTR v);HRESULT value = object.get_textAnchor(BSTR* p);

Property values

Type: BSTR

One of the values in the Property Values section.

String format

CSS information

Applies To All elements
Media visual
Inherited 1
Initial Value

Remarks

The textAnchor property is applied to each individual text chunk within a given text element. (A text chunk is defined by an absolute position adjustment, or an adjustment to the current text position.) Each text chunk has an initial current text position, which represents the point in the user coordinate system resulting from one of the following, depending on context:

  • the application of the x and y attributes on the text element
  • any x or y attribute values on a span element assigned explicitly to the first rendered character in a text chunk
  • determination of the initial current text position for a ISVGTextPathElement element

Requirements

Minimum supported client

Windows Vista with SP1, Windows 7

Minimum supported server

Windows Server 2008 R2

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

CSSStyleDeclaration

currentStyle

style

ISVGTextPathElement

ISVGTextElement

ISVGTSpanElement