protected function applyStylesToElement($element, $styles)
    {
        foreach ($styles as $tag => $data) {
            $element['attributes'][$tag] = $data;
        }

        return $element;
    }