<commit_before>---
id: bad87fee1348bd9aed708826
title: Remove an Element Using jQuery
challengeType: 6
forumTopicId: 18262
dashedName: remove-an-element-using-jquery
---

# --description--

Now let's remove an HTML element from your page using jQuery.

jQuery has a function called `.remove()` that will remove an HTML element entirely

Remove element `target4` from the page by using the `.remove()` function.

# --hints--

You should use jQuery to remove your `target4` element from your page.

```js
assert(
  $('#target4').length === 0 && code.match(/\$\(["']#target4["']\).remove\(\)/g)
);
```

You should only use jQuery to remove this element.

```js
assert(<commit_msg>fix(curriculum): specify id attribute in the instructions (#41716)<commit_after>---
id: bad87fee1348bd9aed708826
title: Remove an Element Using jQuery
challengeType: 6
forumTopicId: 18262
dashedName: remove-an-element-using-jquery
---

# --description--

Now let's remove an HTML element from your page using jQuery.

jQuery has a function called `.remove()` that will remove an HTML element entirely

Remove the `#target4` element from the page by using the `.remove()` function.

# --hints--

You should use jQuery to remove your `target4` element from your page.

```js
assert(
  $('#target4').length === 0 && code.match(/\$\(["']#target4["']\).remove\(\)/g)
);
```

You should only use jQuery to remove this element.

```js
assert(
{'fraction_non_alphanumeric': 0.1423512747875354, 'fraction_numerical': 0.037535410764872525, 'mean_word_length': 4.214022140221402, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5111672', 'n_tokens_mistral': 475, 'n_tokens_neox': 427, 'n_words': 167}