# Credit

#### new Cesium.Credit(html, showOnScreen)
engine/Source/Core/Credit.js 22

A credit contains data pertaining to how to display attributions/credits for certain content on the screen.

Name | Type | Default | Description
--- | --- | --- | ---
`html` | string |  | An string representing an html code snippet
`showOnScreen` | boolean | `false` | optional If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover. All credits are displayed `inline`, if you have an image we recommend sizing it correctly to match the text or use css to `vertical-align` it.

##### Throws:

- DeveloperError : html is required.

##### Example:

    // Create a credit with a tooltip, image and link
    const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png"  style="vertical-align: -7px" title="Cesium"/></a>');

### Members

#### readonly element : HTMLElement
engine/Source/Core/Credit.js 91

Gets the credit element

#### readonly html : string
engine/Source/Core/Credit.js 52

The credit content

#### showOnScreen : boolean
engine/Source/Core/Credit.js 76

Whether the credit should be displayed on screen or in a lightbox

### Methods

#### static Cesium.Credit.clone(credit) → Credit
engine/Source/Core/Credit.js 167

Duplicates a Credit instance.

Name | Type | Description
--- | --- | ---
`credit` | Credit | optional The Credit to duplicate.

##### Returns:

A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)

#### static Cesium.Credit.equals(left, right) → boolean
engine/Source/Core/Credit.js 121

Returns true if the credits are equal

Name | Type | Description
--- | --- | ---
`left` | Credit | optional The first credit
`right` | Credit | optional The second credit

##### Returns:

`true` if left and right are equal, `false` otherwise.

#### equals(credit) → boolean
engine/Source/Core/Credit.js 137

Returns true if the credits are equal

Name | Type | Description
--- | --- | ---
`credit` | Credit | optional The credit to compare to.

##### Returns:

`true` if left and right are equal, `false` otherwise.

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.