# HTML

<figure><img src="/files/9sNtsjaRHMVLzrNvPReJ" alt=""><figcaption></figcaption></figure>

## 1. Getting Started

Building a social feed with HTML is straightforward and efficient. Our advanced attribute system powers your feeds, allowing you to seamlessly integrate attributes directly into your own structure.&#x20;

**Key Features:**

* **Attributes:** Feeds are built by adding attributes directly to your HTML structure
* **Attributes Table:** You can view all available attributes in the [attributes table](https://docs.feedspring.com/feedspring/feeds/instagram/webflow#id-3.1.-available-attributes).
* **Flexability:** All attributes are optional (eg. caption, avatar), only the [feed wrapper](https://docs.feedspring.com/feedspring/feeds/instagram/webflow#id-2.1.-feed-wrapper) and [post wrapper](https://docs.feedspring.com/feedspring/feeds/instagram/webflow#id-2.2.-post-wrapper) are required.

### 1.1. Create Feed <mark style="color:red;">\*</mark>

From your [FeedSpring dashboard](https://docs.feedspring.com/feedspring/feeds/instagram/webflow#feedspring-setup), select the "**Connect New Feed**" option and follow the steps to create a new feed. For more detailed getting started instructions, [view our documentation](https://docs.feedspring.com/feedspring) page.

### 1.2. Installation <mark style="color:red;">\*</mark>

Include the FeedSpring library in your HTML file:

```markup
<!-- FeedSpring Google Review Script -->
<script src="https://scripts.feedspring.com/google-reviews-attrs.js" async defer></script>
```

### 1.3. Basic Usage

FeedSpring works by adding custom attributes to your HTML elements. These attributes define how the feed and its content are structured and displayed. Here’s a detailed example:

```html
    <div feedspring="YOUR-UNIQUE-ID">
        <!-- User Info -->
        <div feed-field="avatar"></div>
        <div feed-field="username"></div>
        <div feed-field="follower-count"></div>
        <div feed-field="bio"></div>

        <!-- Posts -->
        <div feedspring="post">
            <div feed-field="review"></div>
            <div feed-field="img"></div>
            <div feed-field="like-count"></div>
            <div feed-field="comment-count"></div>
        </div>
        <!-- Repeat the above <div feedspring="post"> block for multiple posts -->
    </div>
```

In this example, the `feedspring` attribute is used to wrap the entire feed and individual posts, while `feed-field` attributes are used to specify the content to display within each post.

***

## 2. Setup

### 2.1. Feed Wrapper

The Feed Wrapper specifies where the feed will be rendered on the page and can be added to any element that will enclose the entire feed. We recommend adding a new `<div>` block to wrap your feed and applying the attribute directly to this element.

Add the attribute `name="feedspring"` and`value="YOUR-UNIQUE-ID"` to the `<div>` block

```markup
<div feedspring="YOUR-UNIQUE-ID">
    <!-- Post elements go here -->
</div>
```

{% hint style="info" %}
Your unique feed ID is available on the feed setup page within the app and can be copied directly from there.
{% endhint %}

### 2.2. Post Wrapper

The Post Wrapper contains the main content of a post and is nested inside the Feed Wrapper. This is where you'll add any layout elements related to your posts, such as captions or timestamps. To create the Post Wrapper, add the following attribute to a `<div>` block that will enclose your post. You can duplicate this block for as many posts as you wish to display.

Simply add the attribute `name="feedspring"` and`value="post"`

```html
<div feedspring="post">
    <!-- Fields for the post go here -->
</div>
```

***

## 3. Building

### 3.1. Available Attributes

The following attributes can be added to your layout to start displaying their respective data.

{% hint style="info" %}
**Post Attribute:** Some attributes can only be added to structure inside the post wrapper, these attributes are labeled as 'Post Attribute' below. All other attributes can be placed anywhere inside your feed wrapper.
{% endhint %}

<table data-full-width="false"><thead><tr><th width="208">Field</th><th width="189">Attribute Name</th><th width="188">Attribute Value</th><th data-type="checkbox">Post Attribute*</th></tr></thead><tbody><tr><td>Review Text</td><td>feed-field</td><td>review</td><td>true</td></tr><tr><td>Review Author Image</td><td>feed-field</td><td>avatar</td><td>true</td></tr><tr><td>Review Author Name</td><td>feed-field</td><td>name</td><td>true</td></tr><tr><td>Star (Active)</td><td>feed-field</td><td>star</td><td>true</td></tr><tr><td>Star (Inactive)</td><td>feed-field</td><td>star-inactive</td><td>true</td></tr><tr><td>Timestamp</td><td>feed-field</td><td>timestamp</td><td>true</td></tr><tr><td>Rating (#)</td><td>feed-field</td><td>rating</td><td>true</td></tr><tr><td>Rating (String)</td><td>feed-field</td><td>rating-string</td><td>true</td></tr><tr><td>Total Rating</td><td>feed-field</td><td>total</td><td>false</td></tr><tr><td>Average Rating</td><td>feed-field</td><td>average-rating</td><td>false</td></tr><tr><td>Link</td><td>feed-field</td><td>link</td><td>false</td></tr></tbody></table>

### 3.2. Build Feed

Building your feed is super simple, add the following attributes detailed below to your structural content and publish your site to see the feed in action.&#x20;

#### 3.2.1 Review Text

To display the **review text**, add the following attribute to a **\<text>** element on your page. Since this attribute is related to a post, it should be placed within an element that has the Post Wrapper.

`name="feed-field"` and `value="review"`

#### 3.2.2 Review Author Image

To display the **review author image**, add the following attribute to a **\<img>** element on your page. Since this attribute is related to a post, it should be placed within an element that has the Post Wrapper.

`name="feed-field"` and `value="avatar"`

#### 3.2.3 Review Authors Name

To display the **review author name**, add the following attribute to a **\<text>** element on your page. Since this attribute is related to a post, it should be placed within an element that has the Post Wrapper.

`name="feed-field"` and `value="name"`

#### 3.2.4 Star Rating

To display star ratings for your reviews, you need to include two elements in your layout:

1. **Active Star**: This represents a positive rating and is typically yellow and filled.
2. **Inactive Star**: This represents a missing rating and is usually greyed-out or has lower opacity.

FeedSpring will handle the display of these elements to reflect the rating. For example, for a 4/5 rating, FeedSpring will display 4 active stars and 1 inactive star.

**Active Star**

To display an active star, add the attribute:

`name="feed-field" value="star"`

**Inactive Star**

To display an inactive star, add the attribute:

`name="feed-field" value="star-inactive"`

#### 3.2.5 Timestamp

To display the **timestamp**, add the following attribute to a **\<text>** element on your page. Since this attribute is related to a post, it should be placed within an element that has the Post Wrapper.

`name="feed-field"` and `value="timestamp"`

{% hint style="info" %}
**Timestamp Format:** We also provide options to format the timestamp to suit your own requirements. Please review our [timestamp documentation](/feedspring/getting-started/options-and-advanced/timestamps.md) to learn more about this.
{% endhint %}

#### 3.2.6 Rating (#)

To display the **rating**, add the following attribute to a **\<text>** element on your page. *This will display the rating as a number, for example '4'*

`name="feed-field"` and `value="rating"`

#### 3.2.7 Rating (String)

To display the **rating** as a string, add the following attribute to a **\<text>** element on your page. *This will display the rating as a string, for example 'four'*

`name="feed-field"` and `value="rating-string"`

#### 3.2.8 Total Rating

To display the **total rating**, add the following attribute to a **\<text>** element on your page.

`name="feed-field"` and `value="total"`

#### 3.2.9 Average Rating

To display the **average rating,** add the following attribute to a **\<text>** element on your page.

&#x20;`name="feed-field"` and `value="average-rating"`

#### 3.2.10 Link

To **link** to the business page, add the following attribute to a **\<link-block>** element on your page.

`name="feed-field"` and `value="link"`

***

## 4. Additional Settings

FeedSpring provides a range of advanced options to further customize your feeds and enhance their functionality. Explore the following sections to discover how to implement these features into your builds:

### 4.1 Feed Options

[Learn about additional options](/feedspring/getting-started/options-and-advanced/feed-options.md) you can add to your feeds, such as language tags and more.

### 4.2 Placeholder & Loading

[Learn how to create a seamless](/feedspring/getting-started/options-and-advanced/placeholder-and-loading.md) loading experience for your feeds using placeholders.

### 4.3 Dynamic Attribute

[Learn how to create a dynamic feed](/feedspring/getting-started/options-and-advanced/dynamic-feeds.md), using the layout of a single post.

### 4.4 Timestamp

[Learn how to adjust timestamp format](/feedspring/getting-started/options-and-advanced/timestamps.md) to suit exactly what you want for your feed.

### 4.5 Coded Solutions

[View our collection of coded solutions](/feedspring/getting-started/options-and-advanced/custom-code.md) built to help you solve problems with simple CSS/JS


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.feedspring.com/feedspring/feeds/google-reviews/html.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
