chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3820758a-1f95-4d61-a502-f345b65eeb94 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/rename-branch.md | unknown | ab5bf8ad-a098-4ebc-85d6-87041678408f | 3 | SemanticChunker@1.0.0 | fffbd764e0d2a22ff325ebe4814f7f09507b27f6810a85453178f2ab54138408 | [Rename local branch > Rename a branch both locally and on the remote]
## Rename a branch both locally and on the remote
Combining the two commands above, you can rename a branch both locally and on the remote. Simply check out the branch you want to rename, rename it locally, delete the old remote branch, and push t... | unknown | unknown | [Rename local branch > Rename a branch both locally and on the remote]
## Rename a branch both locally and on the remote
Combining the two commands above, you can rename a branch both locally and on the remote. Simply check out the branch you want to rename, rename it locally, delete the old remote branch, and push t... | [Rename local branch > Rename a branch both locally and on the remote]
## Rename a branch both locally and on the remote
Combining the two commands above, you can rename a branch both locally and on the remote. Simply check out the branch you want to rename, rename it locally, delete the old remote branch, and push t... | code_snippets | ||
9f25ed93-bf3c-4e21-8c7f-e4b5d1b7ae89 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/rename-branch.md | unknown | ab5bf8ad-a098-4ebc-85d6-87041678408f | 1 | SemanticChunker@1.0.0 | 74f3643ea846659df7ed59728cb352855b68f807f372dc699110ee8352b200c6 | [Rename local branch]
## Rename local branch
If you want to rename a local branch, you can use the `git branch -m <old-name> <new-name>` command. This command renames the branch `<old-name>` to `<new-name>`.
```shell
# Usage: git branch -m <old-name> <new-name>
git checkout master
git branch -m patch-1 patch-2
# Re... | unknown | unknown | [Rename local branch]
## Rename local branch
If you want to rename a local branch, you can use the `git branch -m <old-name> <new-name>` command. This command renames the branch `<old-name>` to `<new-name>`.
```shell
# Usage: git branch -m <old-name> <new-name>
git checkout master
git branch -m patch-1 patch-2
# Re... | [Rename local branch]
## Rename local branch
If you want to rename a local branch, you can use the `git branch -m <old-name> <new-name>` command. This command renames the branch `<old-name>` to `<new-name>`.
```shell
# Usage: git branch -m <old-name> <new-name>
git checkout master
git branch -m patch-1 patch-2
# Re... | code_snippets | ||
dcf97da1-2527-4182-8449-36158c5a0df9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/remove-file-from-commit.md | unknown | d8fda830-5223-4d78-8eb8-0103939dd75a | 0 | SemanticChunker@1.0.0 | 03639d58ef947ea899a26e8a65228e55a2fc7fd27868e6eea42d73c97ea62774 | ---
title: Remove a file from the last Git commit
shortTitle: Remove file from commit
language: git
tags: [commit]
cover: cancel-typographer
excerpt: Have you ever made a commit only to realize that a file should not have been included? Let's see how you can fix this!
listed: true
dateModified: 2024-04-02
---
Have you... | unknown | unknown | ---
title: Remove a file from the last Git commit
shortTitle: Remove file from commit
language: git
tags: [commit]
cover: cancel-typographer
excerpt: Have you ever made a commit only to realize that a file should not have been included? Let's see how you can fix this!
listed: true
dateModified: 2024-04-02
---
Have you... | ---
title: Remove a file from the last Git commit
shortTitle: Remove file from commit
language: git
tags: [commit]
cover: cancel-typographer
excerpt: Have you ever made a commit only to realize that a file should not have been included? Let's see how you can fix this!
listed: true
dateModified: 2024-04-02
---
Have you... | code_snippets | ||
80230b10-2921-44f3-a7ac-aa4de933f8d9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/rebase-onto-branch.md | unknown | bf34e16a-e71c-49e6-9fcc-e866eb516a9e | 0 | SemanticChunker@1.0.0 | daeab2135ebbe68be50508ee5489b88ad2d92c54a4eb88dc8bfccf439361568d | ---
title: Rebase onto another Git branch
shortTitle: Rebase onto another branch
language: git
tags: [branch]
cover: sliced-fruits
excerpt: Rebase the current branch onto another branch in Git.
listed: true
dateModified: 2024-04-13
---
If you've ever worked on a large project, you might have come across the need to ge... | unknown | unknown | ---
title: Rebase onto another Git branch
shortTitle: Rebase onto another branch
language: git
tags: [branch]
cover: sliced-fruits
excerpt: Rebase the current branch onto another branch in Git.
listed: true
dateModified: 2024-04-13
---
If you've ever worked on a large project, you might have come across the need to ge... | ---
title: Rebase onto another Git branch
shortTitle: Rebase onto another branch
language: git
tags: [branch]
cover: sliced-fruits
excerpt: Rebase the current branch onto another branch in Git.
listed: true
dateModified: 2024-04-13
---
If you've ever worked on a large project, you might have come across the need to ge... | code_snippets | ||
0c12fbd3-5e70-4591-8b7f-f874e26a6fb2 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commit-graph.md | unknown | 78f87c3c-6eb6-4ad3-b3a3-15f312ac412d | 0 | SemanticChunker@1.0.0 | 38836b24434cff2834bcb51665639f00bc3491931da8542d6f12c43817761069 | ---
title: View a visual graph of the Git repository
shortTitle: View commit graph
language: git
tags: [repository]
cover: city-view
excerpt: If you're more of a visual person, you can view a graph of all commits and branches in the repository using a single Git command.
listed: true
dateModified: 2024-04-25
---
If yo... | unknown | unknown | ---
title: View a visual graph of the Git repository
shortTitle: View commit graph
language: git
tags: [repository]
cover: city-view
excerpt: If you're more of a visual person, you can view a graph of all commits and branches in the repository using a single Git command.
listed: true
dateModified: 2024-04-25
---
If yo... | ---
title: View a visual graph of the Git repository
shortTitle: View commit graph
language: git
tags: [repository]
cover: city-view
excerpt: If you're more of a visual person, you can view a graph of all commits and branches in the repository using a single Git command.
listed: true
dateModified: 2024-04-25
---
If yo... | code_snippets | ||
5e478708-739d-4ac1-a8ef-6dc478a8c17d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-all-branches.md | unknown | 116b0082-1c07-4477-a265-a3e7d0b898b1 | 0 | SemanticChunker@1.0.0 | 0e19960f8b046b0ac08d6c85abb8f483fd0adc9d2351951a03b68da0a23557f4 | ---
title: View all Git branches
shortTitle: View branches
language: git
tags: [repository,branch]
cover: aerial-view-port
excerpt: Learn how to view a list of all local or remote branches in a Git repository.
listed: true
dateModified: 2024-04-30
---
To view a list of all branches in a Git repository, you can use the... | unknown | unknown | ---
title: View all Git branches
shortTitle: View branches
language: git
tags: [repository,branch]
cover: aerial-view-port
excerpt: Learn how to view a list of all local or remote branches in a Git repository.
listed: true
dateModified: 2024-04-30
---
To view a list of all branches in a Git repository, you can use the... | ---
title: View all Git branches
shortTitle: View branches
language: git
tags: [repository,branch]
cover: aerial-view-port
excerpt: Learn how to view a list of all local or remote branches in a Git repository.
listed: true
dateModified: 2024-04-30
---
To view a list of all branches in a Git repository, you can use the... | code_snippets | ||
e073dcfc-52fe-42cd-b0c1-3d90958d944b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-all-branches.md | unknown | 116b0082-1c07-4477-a265-a3e7d0b898b1 | 1 | SemanticChunker@1.0.0 | eea259cca45a03332b01a9bf295b0623fee0dcadbee16221f080f9166ede5c07 | [View all local branches]
## View all local branches
You can use `git branch` to display a list of all **local branches**. As usual, you can use the arrow keys to navigate the list and press <kbd>Q</kbd> to exit.
```shell
# Syntax: git branch
git branch
# master
# patch-1
# patch-2
``` | unknown | unknown | [View all local branches]
## View all local branches
You can use `git branch` to display a list of all **local branches**. As usual, you can use the arrow keys to navigate the list and press <kbd>Q</kbd> to exit.
```shell
# Syntax: git branch
git branch
# master
# patch-1
# patch-2
``` | [View all local branches]
## View all local branches
You can use `git branch` to display a list of all **local branches**. As usual, you can use the arrow keys to navigate the list and press <kbd>Q</kbd> to exit.
```shell
# Syntax: git branch
git branch
# master
# patch-1
# patch-2
``` | code_snippets | ||
f84dc6db-6a2f-4577-9022-bc1a1f1481ad | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-all-branches.md | unknown | 116b0082-1c07-4477-a265-a3e7d0b898b1 | 2 | SemanticChunker@1.0.0 | 6fb067c100e0c909c3af091844632921e9dac2f4383d32b7bdebe6be773e03a0 | [View all local branches > View all remote branches]
## View all remote branches
Similarly, you can use `git branch -r` to display a list of all **remote branches**. You can use the same navigation keys and exit key as before.
```shell
# Syntax: git branch -r
git branch -r
# origin/master
# origin/patch-1
# origin/... | unknown | unknown | [View all local branches > View all remote branches]
## View all remote branches
Similarly, you can use `git branch -r` to display a list of all **remote branches**. You can use the same navigation keys and exit key as before.
```shell
# Syntax: git branch -r
git branch -r
# origin/master
# origin/patch-1
# origin/... | [View all local branches > View all remote branches]
## View all remote branches
Similarly, you can use `git branch -r` to display a list of all **remote branches**. You can use the same navigation keys and exit key as before.
```shell
# Syntax: git branch -r
git branch -r
# origin/master
# origin/patch-1
# origin/... | code_snippets | ||
c88fc945-34f6-43eb-94a8-e0fc9fd8e546 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-changes-summary.md | unknown | c869c6ec-4a9f-4db9-bea0-3c57ef51a708 | 0 | SemanticChunker@1.0.0 | 6a9981e65daf6b8e58d618e3966070f0586e4458a4357bf654e29d952aa8155c | ---
title: View a summary of changes between two Git commits
shortTitle: View changes summary
language: git
tags: [repository,branch]
cover: taking-photos
excerpt: Learn how to view a summary of changes between two Git commits, using a single command.
listed: true
dateModified: 2024-04-24
---
Have you ever wanted to s... | unknown | unknown | ---
title: View a summary of changes between two Git commits
shortTitle: View changes summary
language: git
tags: [repository,branch]
cover: taking-photos
excerpt: Learn how to view a summary of changes between two Git commits, using a single command.
listed: true
dateModified: 2024-04-24
---
Have you ever wanted to s... | ---
title: View a summary of changes between two Git commits
shortTitle: View changes summary
language: git
tags: [repository,branch]
cover: taking-photos
excerpt: Learn how to view a summary of changes between two Git commits, using a single command.
listed: true
dateModified: 2024-04-24
---
Have you ever wanted to s... | code_snippets | ||
059796cf-b82a-4977-a079-8d90457fc215 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-change-remote-url.md | unknown | 3aba8c11-8d85-4e70-9ef7-a69e72349ff1 | 2 | SemanticChunker@1.0.0 | 5e093a46137d0a52f68c31a13d2e6f89bd0e1c98ce8ca662b72f1ccb4eab5013 | [View the remote URL > Change the remote URL]
## Change the remote URL
Similarly, you can use `git remote set-url origin <url>` to change the URL of the remote repository to `<url>`. Again, replace `origin` with the name of your remote repository if it's different.
```shell
# Syntax: git remote set-url origin <url>
... | unknown | unknown | [View the remote URL > Change the remote URL]
## Change the remote URL
Similarly, you can use `git remote set-url origin <url>` to change the URL of the remote repository to `<url>`. Again, replace `origin` with the name of your remote repository if it's different.
```shell
# Syntax: git remote set-url origin <url>
... | [View the remote URL > Change the remote URL]
## Change the remote URL
Similarly, you can use `git remote set-url origin <url>` to change the URL of the remote repository to `<url>`. Again, replace `origin` with the name of your remote repository if it's different.
```shell
# Syntax: git remote set-url origin <url>
... | code_snippets | ||
d1537de7-4f01-44e2-856a-5a7a1abbc46b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-change-remote-url.md | unknown | 3aba8c11-8d85-4e70-9ef7-a69e72349ff1 | 0 | SemanticChunker@1.0.0 | 75a4566f7ac660263cf492a5518f1ce646995e4567329427427f2f85f8d7af64 | ---
title: View or change the remote URL of a Git repository
shortTitle: View or change remote URL
language: git
tags: [repository]
cover: red-mountain
excerpt: Learn how to view or change the URL of the remote repository in Git.
listed: true
dateModified: 2024-04-18
---
The **remote URL** of a Git repository is the U... | unknown | unknown | ---
title: View or change the remote URL of a Git repository
shortTitle: View or change remote URL
language: git
tags: [repository]
cover: red-mountain
excerpt: Learn how to view or change the URL of the remote repository in Git.
listed: true
dateModified: 2024-04-18
---
The **remote URL** of a Git repository is the U... | ---
title: View or change the remote URL of a Git repository
shortTitle: View or change remote URL
language: git
tags: [repository]
cover: red-mountain
excerpt: Learn how to view or change the URL of the remote repository in Git.
listed: true
dateModified: 2024-04-18
---
The **remote URL** of a Git repository is the U... | code_snippets | ||
f1833b18-3fb5-48f8-b75d-443a817aa064 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-change-remote-url.md | unknown | 3aba8c11-8d85-4e70-9ef7-a69e72349ff1 | 1 | SemanticChunker@1.0.0 | 66eda24896c1f143ea6f040248438c4d4322e1ec6e928e306ac85f5c586aa8c7 | [View the remote URL]
## View the remote URL
You can use `git config --get remote.origin.url` to display the URL of the remote repository. The `origin` is the **default name of the remote repository**, but you can replace it with the name of your remote repository.
```shell
# Syntax: git config --get remote.origin.u... | unknown | unknown | [View the remote URL]
## View the remote URL
You can use `git config --get remote.origin.url` to display the URL of the remote repository. The `origin` is the **default name of the remote repository**, but you can replace it with the name of your remote repository.
```shell
# Syntax: git config --get remote.origin.u... | [View the remote URL]
## View the remote URL
You can use `git config --get remote.origin.url` to display the URL of the remote repository. The `origin` is the **default name of the remote repository**, but you can replace it with the name of your remote repository.
```shell
# Syntax: git config --get remote.origin.u... | code_snippets | ||
3d7e0dd4-9890-4600-8957-81321cdce8a7 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/undo-commit-without-rewriting-history.md | unknown | fe61f967-a9fd-4ad6-9347-018b9c3be2de | 2 | SemanticChunker@1.0.0 | f4d682a64fe159c49d65c661db93f85f1107579881657a3d5d9efa38373c1fd0 | [Revert a commit > Revert the last commit]
## Revert the last commit
The **latest commit** can be references using the `HEAD` pointer. So, to revert the last commit, you can simply use `git revert HEAD`.
```shell
# Syntax: git revert HEAD
git revert HEAD
# Reverts the last commit and creates a new commit
# with the... | unknown | unknown | [Revert a commit > Revert the last commit]
## Revert the last commit
The **latest commit** can be references using the `HEAD` pointer. So, to revert the last commit, you can simply use `git revert HEAD`.
```shell
# Syntax: git revert HEAD
git revert HEAD
# Reverts the last commit and creates a new commit
# with the... | [Revert a commit > Revert the last commit]
## Revert the last commit
The **latest commit** can be references using the `HEAD` pointer. So, to revert the last commit, you can simply use `git revert HEAD`.
```shell
# Syntax: git revert HEAD
git revert HEAD
# Reverts the last commit and creates a new commit
# with the... | code_snippets | ||
d470a3dd-8e59-4fdb-bf0f-8410aa0bd055 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/undo-commit-without-rewriting-history.md | unknown | fe61f967-a9fd-4ad6-9347-018b9c3be2de | 1 | SemanticChunker@1.0.0 | 1fdb65eeb4d237b0e7cf7be31e30f12e04ce5cfbe20fb7d18316dd63237add27 | [Revert a commit]
## Revert a commit
As you might have guessed, `git revert` is the command you're looking for. Using this command, you can **revert a commit**, creating a new commit with the inverse of the commit's changes.
```shell
# Syntax: git revert <commit>
git revert 3050fc0
# Reverts the commit `3050fc0` an... | unknown | unknown | [Revert a commit]
## Revert a commit
As you might have guessed, `git revert` is the command you're looking for. Using this command, you can **revert a commit**, creating a new commit with the inverse of the commit's changes.
```shell
# Syntax: git revert <commit>
git revert 3050fc0
# Reverts the commit `3050fc0` an... | [Revert a commit]
## Revert a commit
As you might have guessed, `git revert` is the command you're looking for. Using this command, you can **revert a commit**, creating a new commit with the inverse of the commit's changes.
```shell
# Syntax: git revert <commit>
git revert 3050fc0
# Reverts the commit `3050fc0` an... | code_snippets | ||
f0b0d3f9-35ce-467b-b0ba-6e68690bbf7f | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/undo-commit-without-rewriting-history.md | unknown | fe61f967-a9fd-4ad6-9347-018b9c3be2de | 0 | SemanticChunker@1.0.0 | 064cee232c8e390d82a8944f55711f056bdf364dc06643b3de35b73a2528dfb5 | ---
title: Undo a commit in Git
shortTitle: Undo commit
language: git
tags: [commit,branch]
cover: night-tram
excerpt: Learn the simple way to undo a commit in Git without rewriting history.
listed: true
dateModified: 2023-05-27
---
It's not uncommon to make a mistake when committing changes to a repository. When you ... | unknown | unknown | ---
title: Undo a commit in Git
shortTitle: Undo commit
language: git
tags: [commit,branch]
cover: night-tram
excerpt: Learn the simple way to undo a commit in Git without rewriting history.
listed: true
dateModified: 2023-05-27
---
It's not uncommon to make a mistake when committing changes to a repository. When you ... | ---
title: Undo a commit in Git
shortTitle: Undo commit
language: git
tags: [commit,branch]
cover: night-tram
excerpt: Learn the simple way to undo a commit in Git without rewriting history.
listed: true
dateModified: 2023-05-27
---
It's not uncommon to make a mistake when committing changes to a repository. When you ... | code_snippets | ||
6234880b-66b4-4c56-81e6-4086f80cc0db | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/switch-to-branch.md | unknown | 9b440724-a263-4791-89d6-fdd32b6685cf | 0 | SemanticChunker@1.0.0 | 123f0d5b19c8c59495dd9a7c6a893923993630e52540c70dc0521f09b5a314f3 | ---
title: Switch to a Git branch
shortTitle: Switch branch
language: git
tags: [branch]
cover: bridge
excerpt: Learn how to easily switch between branches in Git.
listed: true
dateModified: 2024-04-29
---
Git branches are used to develop features, fix bugs, and experiment with new ideas. You can easily **switch betwe... | unknown | unknown | ---
title: Switch to a Git branch
shortTitle: Switch branch
language: git
tags: [branch]
cover: bridge
excerpt: Learn how to easily switch between branches in Git.
listed: true
dateModified: 2024-04-29
---
Git branches are used to develop features, fix bugs, and experiment with new ideas. You can easily **switch betwe... | ---
title: Switch to a Git branch
shortTitle: Switch branch
language: git
tags: [branch]
cover: bridge
excerpt: Learn how to easily switch between branches in Git.
listed: true
dateModified: 2024-04-29
---
Git branches are used to develop features, fix bugs, and experiment with new ideas. You can easily **switch betwe... | code_snippets | ||
8bac11e0-d874-49f0-8cff-3ec4d9d0efc9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/switch-to-branch.md | unknown | 9b440724-a263-4791-89d6-fdd32b6685cf | 1 | SemanticChunker@1.0.0 | 223e949399cf5da93273972f51888629b689e86fa5a6ddf95bfe380aa9626087 | [Switch to an existing branch]
## Switch to an existing branch
In order to switch to an **existing branch**, you can use `git checkout <branch>`. If you're using a newer version of Git, you can also use `git switch <branch>`.
```shell
# Syntax: git checkout <branch>
# or: git switch <branch>
git checkout patch-1
# ... | unknown | unknown | [Switch to an existing branch]
## Switch to an existing branch
In order to switch to an **existing branch**, you can use `git checkout <branch>`. If you're using a newer version of Git, you can also use `git switch <branch>`.
```shell
# Syntax: git checkout <branch>
# or: git switch <branch>
git checkout patch-1
# ... | [Switch to an existing branch]
## Switch to an existing branch
In order to switch to an **existing branch**, you can use `git checkout <branch>`. If you're using a newer version of Git, you can also use `git switch <branch>`.
```shell
# Syntax: git checkout <branch>
# or: git switch <branch>
git checkout patch-1
# ... | code_snippets | ||
e271f9a5-0eab-4732-a5f3-c925378a1727 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/switch-to-branch.md | unknown | 9b440724-a263-4791-89d6-fdd32b6685cf | 2 | SemanticChunker@1.0.0 | 5411dc6a6a03216672d534e4c3b27c89094aee9c89f0d688622c44faaa1bc1a8 | [Switch to an existing branch > Switch to the previous branch]
## Switch to the previous branch
Subsequently, you can switch back to the **previous branch** using `git checkout -` or `git switch -`. Here, `-` is a **shorthand** for the previous branch.
```shell
# Syntax: git checkout -
# or: git switch -
git checko... | unknown | unknown | [Switch to an existing branch > Switch to the previous branch]
## Switch to the previous branch
Subsequently, you can switch back to the **previous branch** using `git checkout -` or `git switch -`. Here, `-` is a **shorthand** for the previous branch.
```shell
# Syntax: git checkout -
# or: git switch -
git checko... | [Switch to an existing branch > Switch to the previous branch]
## Switch to the previous branch
Subsequently, you can switch back to the **previous branch** using `git checkout -` or `git switch -`. Here, `-` is a **shorthand** for the previous branch.
```shell
# Syntax: git checkout -
# or: git switch -
git checko... | code_snippets | ||
81a07575-a867-41b7-846b-28e96b6f017d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/update-commit-message-or-contents.md | unknown | 46f732ed-ba76-45b2-95ec-feee9de794cc | 1 | SemanticChunker@1.0.0 | 3880dc8200088dacf423b92a611face916776d511f9a192a98bf49a026af6b26 | [Change the last commit's message]
## Change the last commit's message
If you only want to change the last commit's message, you can use `--amend` and simply add the `-m` option followed by the new message. This will replace the last commit's message with the new one.
```shell
# Syntax: git commit --amend -m <messag... | unknown | unknown | [Change the last commit's message]
## Change the last commit's message
If you only want to change the last commit's message, you can use `--amend` and simply add the `-m` option followed by the new message. This will replace the last commit's message with the new one.
```shell
# Syntax: git commit --amend -m <messag... | [Change the last commit's message]
## Change the last commit's message
If you only want to change the last commit's message, you can use `--amend` and simply add the `-m` option followed by the new message. This will replace the last commit's message with the new one.
```shell
# Syntax: git commit --amend -m <messag... | code_snippets | ||
d603bb11-c885-4c5b-ad57-4c1557091451 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/update-commit-message-or-contents.md | unknown | 46f732ed-ba76-45b2-95ec-feee9de794cc | 2 | SemanticChunker@1.0.0 | eed2d945c86d7d372b3e8dc11f250bec14dde22b04095290aad389a2df8470be | [Change the last commit's message > Change the last commit's contents]
## Change the last commit's contents
If you want to change the last commit's contents, you can use `--amend` after staging the changes you want to add to the last commit. This will add any staged changes to the last commit, without changing its me... | unknown | unknown | [Change the last commit's message > Change the last commit's contents]
## Change the last commit's contents
If you want to change the last commit's contents, you can use `--amend` after staging the changes you want to add to the last commit. This will add any staged changes to the last commit, without changing its me... | [Change the last commit's message > Change the last commit's contents]
## Change the last commit's contents
If you want to change the last commit's contents, you can use `--amend` after staging the changes you want to add to the last commit. This will add any staged changes to the last commit, without changing its me... | code_snippets | ||
e2106256-26c9-4ad5-beb6-4a5fd765d501 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/update-commit-message-or-contents.md | unknown | 46f732ed-ba76-45b2-95ec-feee9de794cc | 0 | SemanticChunker@1.0.0 | 4c121ed0f80bc64ae94d5099b5fc309a03eb88d80c812ec287753c07d984189e | ---
title: Change the last commit's message or contents in Git
shortTitle: Amend last commit
language: git
tags: [commit]
cover: greek-coffee
excerpt: Learn how to effortlessly amend the last commit's message or contents using Git and fix any mistakes you might have made.
listed: true
dateModified: 2023-05-23
---
Have... | unknown | unknown | ---
title: Change the last commit's message or contents in Git
shortTitle: Amend last commit
language: git
tags: [commit]
cover: greek-coffee
excerpt: Learn how to effortlessly amend the last commit's message or contents using Git and fix any mistakes you might have made.
listed: true
dateModified: 2023-05-23
---
Have... | ---
title: Change the last commit's message or contents in Git
shortTitle: Amend last commit
language: git
tags: [commit]
cover: greek-coffee
excerpt: Learn how to effortlessly amend the last commit's message or contents using Git and fix any mistakes you might have made.
listed: true
dateModified: 2023-05-23
---
Have... | code_snippets | ||
10ef27ea-3629-413e-9a04-dda7d6d928e2 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/submodules.md | unknown | 9ee65269-e1a4-4e7c-8773-890c04f19852 | 2 | SemanticChunker@1.0.0 | d34441cac7834f1ad0e3d37c41c0929dfae30c1b160dee2427a3ffd4e1559d8d | [Add a submodule > Initialize submodules]
## Initialize submodules
After adding a submodule to your repository, you will need to **initialize and update** the submodule to fetch its contents. You can do this by running `git submodule update --init --recursive`.
While the `--recursive` flag isn't strictly necessary, ... | unknown | unknown | [Add a submodule > Initialize submodules]
## Initialize submodules
After adding a submodule to your repository, you will need to **initialize and update** the submodule to fetch its contents. You can do this by running `git submodule update --init --recursive`.
While the `--recursive` flag isn't strictly necessary, ... | [Add a submodule > Initialize submodules]
## Initialize submodules
After adding a submodule to your repository, you will need to **initialize and update** the submodule to fetch its contents. You can do this by running `git submodule update --init --recursive`.
While the `--recursive` flag isn't strictly necessary, ... | code_snippets | ||
7a99c6b6-2699-4af7-8134-3fc879424f5a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/submodules.md | unknown | 9ee65269-e1a4-4e7c-8773-890c04f19852 | 0 | SemanticChunker@1.0.0 | 30fdfb501bb3681270b4eb124a49dfefe602386d6e44cf3e8c49f1dbfd12c37f | ---
title: An introductory guide to Git submodules
shortTitle: Submodules
language: git
tags: [repository,submodule]
cover: rocky-mountains-2
excerpt: Git submodules are a powerful feature that often trips up developers. Fret not, this guide will help you understand the basics.
listed: true
dateModified: 2024-04-27
---... | unknown | unknown | ---
title: An introductory guide to Git submodules
shortTitle: Submodules
language: git
tags: [repository,submodule]
cover: rocky-mountains-2
excerpt: Git submodules are a powerful feature that often trips up developers. Fret not, this guide will help you understand the basics.
listed: true
dateModified: 2024-04-27
---... | ---
title: An introductory guide to Git submodules
shortTitle: Submodules
language: git
tags: [repository,submodule]
cover: rocky-mountains-2
excerpt: Git submodules are a powerful feature that often trips up developers. Fret not, this guide will help you understand the basics.
listed: true
dateModified: 2024-04-27
---... | code_snippets | ||
8b2f5da5-6fe4-477f-8c16-0a86282aa597 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/submodules.md | unknown | 9ee65269-e1a4-4e7c-8773-890c04f19852 | 1 | SemanticChunker@1.0.0 | 58112af682d91e6efb368ca93c1cf456204ba672ffa5e2b1806b27b482d03c07 | [Add a submodule]
## Add a submodule
To add a submodule to your repository, you can use `git submodule add <upstream-path> <local-path>`. The first argument is the **URL of the repository** you want to add as a submodule, and the second argument is the **path** where you want the submodule to be located within your r... | unknown | unknown | [Add a submodule]
## Add a submodule
To add a submodule to your repository, you can use `git submodule add <upstream-path> <local-path>`. The first argument is the **URL of the repository** you want to add as a submodule, and the second argument is the **path** where you want the submodule to be located within your r... | [Add a submodule]
## Add a submodule
To add a submodule to your repository, you can use `git submodule add <upstream-path> <local-path>`. The first argument is the **URL of the repository** you want to add as a submodule, and the second argument is the **path** where you want the submodule to be located within your r... | code_snippets | ||
952e86b3-e768-4e93-87d6-874a5988fbde | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/submodules.md | unknown | 9ee65269-e1a4-4e7c-8773-890c04f19852 | 4 | SemanticChunker@1.0.0 | 4e58d8412790e99b740be4c264166f58d2bc09dad612b7debdfe607848ee5898 | [Add a submodule > Rename a submodule]
## Rename a submodule
Luckily, renaming a submodule is just as easy as renaming a directory. Using `git mv <old-submodule> <new-submodule>` will **rename the directory** containing the submodule. This will also **update the submodule's path** in the `.gitmodules` file.
```shell... | unknown | unknown | [Add a submodule > Rename a submodule]
## Rename a submodule
Luckily, renaming a submodule is just as easy as renaming a directory. Using `git mv <old-submodule> <new-submodule>` will **rename the directory** containing the submodule. This will also **update the submodule's path** in the `.gitmodules` file.
```shell... | [Add a submodule > Rename a submodule]
## Rename a submodule
Luckily, renaming a submodule is just as easy as renaming a directory. Using `git mv <old-submodule> <new-submodule>` will **rename the directory** containing the submodule. This will also **update the submodule's path** in the `.gitmodules` file.
```shell... | code_snippets | ||
c2a0f532-21b6-475f-a16d-7abae7607b34 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/submodules.md | unknown | 9ee65269-e1a4-4e7c-8773-890c04f19852 | 5 | SemanticChunker@1.0.0 | 94b12700ca1068f5625077fbceac5058f3cf09ad4d83c367ffca4af2ddd0b8a7 | [Add a submodule > Delete a submodule]
## Delete a submodule
Deleting a submodule is a little more complicated. You'll first have to use `git submodule deinit -f -- <submodule>` to **unregister the submodule**. Then, you need to remove the `.git/modules/<submodule>` directory, using `rm -rf .git/modules/<submodule>`.... | unknown | unknown | [Add a submodule > Delete a submodule]
## Delete a submodule
Deleting a submodule is a little more complicated. You'll first have to use `git submodule deinit -f -- <submodule>` to **unregister the submodule**. Then, you need to remove the `.git/modules/<submodule>` directory, using `rm -rf .git/modules/<submodule>`.... | [Add a submodule > Delete a submodule]
## Delete a submodule
Deleting a submodule is a little more complicated. You'll first have to use `git submodule deinit -f -- <submodule>` to **unregister the submodule**. Then, you need to remove the `.git/modules/<submodule>` directory, using `rm -rf .git/modules/<submodule>`.... | code_snippets | ||
ef73ecd9-4c91-4fc8-8e08-e3ad68a37a22 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/submodules.md | unknown | 9ee65269-e1a4-4e7c-8773-890c04f19852 | 3 | SemanticChunker@1.0.0 | f60ff46b24e9444540cc8a98a9fccf9b38db140a93f53eb97fdd5871e5087fd8 | [Add a submodule > Update submodules]
## Update submodules
When you clone a repository that contains submodules, the submodules will be **checked out at a specific commit**. When you want to **update the contents** of the submodules to the latest version, you can use `git submodule update --recursive --remote`. Again... | unknown | unknown | [Add a submodule > Update submodules]
## Update submodules
When you clone a repository that contains submodules, the submodules will be **checked out at a specific commit**. When you want to **update the contents** of the submodules to the latest version, you can use `git submodule update --recursive --remote`. Again... | [Add a submodule > Update submodules]
## Update submodules
When you clone a repository that contains submodules, the submodules will be **checked out at a specific commit**. When you want to **update the contents** of the submodules to the latest version, you can use `git submodule update --recursive --remote`. Again... | code_snippets | ||
3778a1e9-0fb7-4cf7-a4b0-ffba57c58541 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stashing.md | unknown | 89de88d4-f24b-4059-abf5-3065a39d01b9 | 3 | SemanticChunker@1.0.0 | 6bb76d9dcf3ba26663df072cd6c72f0a3520a96403e3d4dd9f30a4524e97b972 | [Stashing changes > Viewing stash changes]
## Viewing stash changes
To view the changes stored in a stash, you can use the `git stash show` command. This command displays the changes introduced by the stash relative to the parent commit. You can provide the **stash reference** to view a specific stash, or omit it to ... | unknown | unknown | [Stashing changes > Viewing stash changes]
## Viewing stash changes
To view the changes stored in a stash, you can use the `git stash show` command. This command displays the changes introduced by the stash relative to the parent commit. You can provide the **stash reference** to view a specific stash, or omit it to ... | [Stashing changes > Viewing stash changes]
## Viewing stash changes
To view the changes stored in a stash, you can use the `git stash show` command. This command displays the changes introduced by the stash relative to the parent commit. You can provide the **stash reference** to view a specific stash, or omit it to ... | code_snippets | ||
412d4a64-f533-4cbc-9ae6-fa8235b0583f | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stashing.md | unknown | 89de88d4-f24b-4059-abf5-3065a39d01b9 | 0 | SemanticChunker@1.0.0 | 898b2acdcfc1048809daa7e9f68353a634dcd3f3244dbe1e860ea6a8ba182185 | ---
title: A guide to Git stashing
shortTitle: Git stashing
language: git
tags: [repository,stash]
cover: purple-leaves
excerpt: Learn all you need to know about Git stashing, including how to stash changes, apply, list, and delete stashes.
listed: true
dateModified: 2024-04-05
---
Git's stashing feature allows you to... | unknown | unknown | ---
title: A guide to Git stashing
shortTitle: Git stashing
language: git
tags: [repository,stash]
cover: purple-leaves
excerpt: Learn all you need to know about Git stashing, including how to stash changes, apply, list, and delete stashes.
listed: true
dateModified: 2024-04-05
---
Git's stashing feature allows you to... | ---
title: A guide to Git stashing
shortTitle: Git stashing
language: git
tags: [repository,stash]
cover: purple-leaves
excerpt: Learn all you need to know about Git stashing, including how to stash changes, apply, list, and delete stashes.
listed: true
dateModified: 2024-04-05
---
Git's stashing feature allows you to... | code_snippets | ||
55f364b4-9e30-4767-800c-413e439561b9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stashing.md | unknown | 89de88d4-f24b-4059-abf5-3065a39d01b9 | 4 | SemanticChunker@1.0.0 | e14b1b84a5f90c4ec29045ab347476ae6e682f0b3c257d6f69e7f1f8dff15405 | [Stashing changes > Applying a stash]
## Applying a stash
To apply a specific stash, you can use the `git stash apply` command. This command applies the changes from the specified stash to the working directory. You can provide the **stash reference** to apply a specific stash, or omit it to apply the **latest stash*... | unknown | unknown | [Stashing changes > Applying a stash]
## Applying a stash
To apply a specific stash, you can use the `git stash apply` command. This command applies the changes from the specified stash to the working directory. You can provide the **stash reference** to apply a specific stash, or omit it to apply the **latest stash*... | [Stashing changes > Applying a stash]
## Applying a stash
To apply a specific stash, you can use the `git stash apply` command. This command applies the changes from the specified stash to the working directory. You can provide the **stash reference** to apply a specific stash, or omit it to apply the **latest stash*... | code_snippets | ||
73e59e42-197c-4f74-92c4-b86940d346a6 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stashing.md | unknown | 89de88d4-f24b-4059-abf5-3065a39d01b9 | 2 | SemanticChunker@1.0.0 | 0a8400b5c3f9e4b1767a017d459510fec0ca5188d9e7a2443d10bd0792368bbe | [Stashing changes > Listing stashes]
## Listing stashes
Stashes are stored as a **stack**, with the most recent stash at the top. You can view a list of all stashes using the `git stash list` command. This command displays the stash reference, the branch or commit the stash was created on, and the message associated ... | unknown | unknown | [Stashing changes > Listing stashes]
## Listing stashes
Stashes are stored as a **stack**, with the most recent stash at the top. You can view a list of all stashes using the `git stash list` command. This command displays the stash reference, the branch or commit the stash was created on, and the message associated ... | [Stashing changes > Listing stashes]
## Listing stashes
Stashes are stored as a **stack**, with the most recent stash at the top. You can view a list of all stashes using the `git stash list` command. This command displays the stash reference, the branch or commit the stash was created on, and the message associated ... | code_snippets | ||
b3c7f474-b6b0-4fe9-a0fb-ad793181b59d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stashing.md | unknown | 89de88d4-f24b-4059-abf5-3065a39d01b9 | 1 | SemanticChunker@1.0.0 | 6a2e35530b1cfa0cbf1b759f62c49c3f20b0a370c975d3e0dfe87b8dcdd13cc2 | [Stashing changes]
## Stashing changes
In order to stash your changes, you can use the `git stash push` command. This command saves the **current state** of the working directory and index into a new stash. You can optionally provide a message for the stash, and include **untracked files** using the `-u` option.
```... | unknown | unknown | [Stashing changes]
## Stashing changes
In order to stash your changes, you can use the `git stash push` command. This command saves the **current state** of the working directory and index into a new stash. You can optionally provide a message for the stash, and include **untracked files** using the `-u` option.
```... | [Stashing changes]
## Stashing changes
In order to stash your changes, you can use the `git stash push` command. This command saves the **current state** of the working directory and index into a new stash. You can optionally provide a message for the stash, and include **untracked files** using the `-u` option.
```... | code_snippets | ||
b4584b13-a784-47d2-aaaf-bbbac024b51b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stashing.md | unknown | 89de88d4-f24b-4059-abf5-3065a39d01b9 | 5 | SemanticChunker@1.0.0 | 7aa182eb29bdd5b11d0fc83356e2dbbcd534292d290cb7b490631737d467776a | [Stashing changes > Deleting stashes]
## Deleting stashes
You can **delete stashes** using the `git stash drop` command. This command removes the specified stash from the stash list.
```shell
# Usage: git stash drop <stash>
git stash drop
# Deletes the latest stash
git stash drop stash@{1}
# Deletes the stash with... | unknown | unknown | [Stashing changes > Deleting stashes]
## Deleting stashes
You can **delete stashes** using the `git stash drop` command. This command removes the specified stash from the stash list.
```shell
# Usage: git stash drop <stash>
git stash drop
# Deletes the latest stash
git stash drop stash@{1}
# Deletes the stash with... | [Stashing changes > Deleting stashes]
## Deleting stashes
You can **delete stashes** using the `git stash drop` command. This command removes the specified stash from the stash list.
```shell
# Usage: git stash drop <stash>
git stash drop
# Deletes the latest stash
git stash drop stash@{1}
# Deletes the stash with... | code_snippets | ||
15d781d4-c24a-4518-ba8e-8c84c61cafac | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stage-unstage-files.md | unknown | 158c3e8d-b68a-4727-9b68-ff366a0b530f | 2 | SemanticChunker@1.0.0 | dfb129b82565e0f204a2625f02f217c3dd86a63720cc034c4383e7dbdf9c8687 | [Stage files > Unstage files]
## Unstage files
Subsequently, you can remove files from the staging area using the `git restore --staged <pathspec>` command. This command allows you to unstage individual files, files with a specific extension, or all changes in the staging area.
```shell
# Usage: git restore --staged... | unknown | unknown | [Stage files > Unstage files]
## Unstage files
Subsequently, you can remove files from the staging area using the `git restore --staged <pathspec>` command. This command allows you to unstage individual files, files with a specific extension, or all changes in the staging area.
```shell
# Usage: git restore --staged... | [Stage files > Unstage files]
## Unstage files
Subsequently, you can remove files from the staging area using the `git restore --staged <pathspec>` command. This command allows you to unstage individual files, files with a specific extension, or all changes in the staging area.
```shell
# Usage: git restore --staged... | code_snippets | ||
29d81e54-f821-43ff-8755-8f5d398f289a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stage-unstage-files.md | unknown | 158c3e8d-b68a-4727-9b68-ff366a0b530f | 1 | SemanticChunker@1.0.0 | b8be10a48e48322359b88336b0415612ee75256e3efd5613187035bf29addd66 | [Stage files]
## Stage files
Adding changes to the staging area is as simple as using the `git add <pathspec>` command, with an appropriate **filename or fileglob**. That way, you can add individual files, files with a specific extension, or all changes in the working directory.
```shell
# Usage: git add <pathspec>
... | unknown | unknown | [Stage files]
## Stage files
Adding changes to the staging area is as simple as using the `git add <pathspec>` command, with an appropriate **filename or fileglob**. That way, you can add individual files, files with a specific extension, or all changes in the working directory.
```shell
# Usage: git add <pathspec>
... | [Stage files]
## Stage files
Adding changes to the staging area is as simple as using the `git add <pathspec>` command, with an appropriate **filename or fileglob**. That way, you can add individual files, files with a specific extension, or all changes in the working directory.
```shell
# Usage: git add <pathspec>
... | code_snippets | ||
5a2ce589-b2b9-4c7c-9166-8268581e9a58 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/stage-unstage-files.md | unknown | 158c3e8d-b68a-4727-9b68-ff366a0b530f | 0 | SemanticChunker@1.0.0 | a7e99a029f5afa65d1c224cc37f34a2db1cbc33b74de244b17bf733306f1b14b | ---
title: Add or remove files from the Git staging area
shortTitle: Stage or unstage files
language: git
tags: [commit]
cover: coconuts
excerpt: Learn how to effectively use Git's staging area, by adding or removing files from it.
listed: true
dateModified: 2024-04-07
---
Git's **staging area** is used to prepare cha... | unknown | unknown | ---
title: Add or remove files from the Git staging area
shortTitle: Stage or unstage files
language: git
tags: [commit]
cover: coconuts
excerpt: Learn how to effectively use Git's staging area, by adding or removing files from it.
listed: true
dateModified: 2024-04-07
---
Git's **staging area** is used to prepare cha... | ---
title: Add or remove files from the Git staging area
shortTitle: Stage or unstage files
language: git
tags: [commit]
cover: coconuts
excerpt: Learn how to effectively use Git's staging area, by adding or removing files from it.
listed: true
dateModified: 2024-04-07
---
Git's **staging area** is used to prepare cha... | code_snippets | ||
230e5244-2425-4962-a4f6-8af388f42b49 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-summary.md | unknown | 9dcfff89-9572-436a-b987-fbe6ec112d74 | 1 | SemanticChunker@1.0.0 | 14840c9fe2930fa87226d0f4a8b9437d8a61bcdbd251b8f8fc9e162ab5eff21b | [Short summary of all commits]
## Short summary of all commits
One of these is `--oneline`, which is actually a shorthand for `--pretty=oneline --abbrev-commit`. It prints a short summary of all commits, with each commit being printed on a single line.
```shell
git log --oneline
# d540ba1 Merge network bug fix
# 305... | unknown | unknown | [Short summary of all commits]
## Short summary of all commits
One of these is `--oneline`, which is actually a shorthand for `--pretty=oneline --abbrev-commit`. It prints a short summary of all commits, with each commit being printed on a single line.
```shell
git log --oneline
# d540ba1 Merge network bug fix
# 305... | [Short summary of all commits]
## Short summary of all commits
One of these is `--oneline`, which is actually a shorthand for `--pretty=oneline --abbrev-commit`. It prints a short summary of all commits, with each commit being printed on a single line.
```shell
git log --oneline
# d540ba1 Merge network bug fix
# 305... | code_snippets | ||
a920f9d1-e352-490e-8c42-08ba52879c45 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-summary.md | unknown | 9dcfff89-9572-436a-b987-fbe6ec112d74 | 2 | SemanticChunker@1.0.0 | fde004fa82b2ca2eadcc8f44eae1b9a406e0b45c1645efc13f6405672d5f113c | [Short summary of all commits > Short summary of commits without merges]
## Short summary of commits without merges
Other options can be used in conjunction with `--oneline` to further customize the output. For example, you can use `--no-merges` to exclude merge commits from the output.
```shell
git log --oneline --... | unknown | unknown | [Short summary of all commits > Short summary of commits without merges]
## Short summary of commits without merges
Other options can be used in conjunction with `--oneline` to further customize the output. For example, you can use `--no-merges` to exclude merge commits from the output.
```shell
git log --oneline --... | [Short summary of all commits > Short summary of commits without merges]
## Short summary of commits without merges
Other options can be used in conjunction with `--oneline` to further customize the output. For example, you can use `--no-merges` to exclude merge commits from the output.
```shell
git log --oneline --... | code_snippets | ||
c57bc47c-04da-44c9-817f-d63f9ee7f493 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-summary.md | unknown | 9dcfff89-9572-436a-b987-fbe6ec112d74 | 0 | SemanticChunker@1.0.0 | 6de92499c2e6b3514e07a9a512e79adbc7791499fa32c6ff67667d13258c6bed | ---
title: View a short summary of Git commits
shortTitle: Short commits summary
language: git
tags: [repository,commit]
cover: dark-city
excerpt: Learn how to view a short summary of your Git commits using git log.
listed: true
dateModified: 2023-05-23
---
One of the most common things you might need to do when worki... | unknown | unknown | ---
title: View a short summary of Git commits
shortTitle: Short commits summary
language: git
tags: [repository,commit]
cover: dark-city
excerpt: Learn how to view a short summary of your Git commits using git log.
listed: true
dateModified: 2023-05-23
---
One of the most common things you might need to do when worki... | ---
title: View a short summary of Git commits
shortTitle: Short commits summary
language: git
tags: [repository,commit]
cover: dark-city
excerpt: Learn how to view a short summary of your Git commits using git log.
listed: true
dateModified: 2023-05-23
---
One of the most common things you might need to do when worki... | code_snippets | ||
e246b95d-bd11-4298-9339-d4fce8ec265b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-status.md | unknown | dd9cc1f3-8bb2-4472-bbc7-51e21fea7058 | 0 | SemanticChunker@1.0.0 | 292916bc2844e6d3547993259bcd9d85aa1f068c0de7bfab6aba9e462b68cbfb | ---
title: View the current Git status
shortTitle: View status
language: git
tags: [branch]
cover: periscope
excerpt: Learn how to view the current status of the working tree in Git.
listed: true
dateModified: 2024-04-12
---
Git provides a command to view the **current status of the working tree**. The `git status` co... | unknown | unknown | ---
title: View the current Git status
shortTitle: View status
language: git
tags: [branch]
cover: periscope
excerpt: Learn how to view the current status of the working tree in Git.
listed: true
dateModified: 2024-04-12
---
Git provides a command to view the **current status of the working tree**. The `git status` co... | ---
title: View the current Git status
shortTitle: View status
language: git
tags: [branch]
cover: periscope
excerpt: Learn how to view the current status of the working tree in Git.
listed: true
dateModified: 2024-04-12
---
Git provides a command to view the **current status of the working tree**. The `git status` co... | code_snippets | ||
fd7e7a59-dde4-4034-a8fb-247c3f2f06a3 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-undo-history.md | unknown | 70dffbaf-5b6e-41af-896b-c71b499fa904 | 0 | SemanticChunker@1.0.0 | ad677fcccd8c2fcf17a4d7e40eccba4fa678cdfffa450cb803979820b8f28d19 | ---
title: View Git "undo" history
shortTitle: Undo history
language: git
tags: [repository,branch]
cover: rock-climbing
excerpt: Learn how to view your "undo" history using git reflog and reset your repository to a previous state.
listed: true
dateModified: 2023-05-21
---
Sometimes, `git log` doesn't cut it, especial... | unknown | unknown | ---
title: View Git "undo" history
shortTitle: Undo history
language: git
tags: [repository,branch]
cover: rock-climbing
excerpt: Learn how to view your "undo" history using git reflog and reset your repository to a previous state.
listed: true
dateModified: 2023-05-21
---
Sometimes, `git log` doesn't cut it, especial... | ---
title: View Git "undo" history
shortTitle: Undo history
language: git
tags: [repository,branch]
cover: rock-climbing
excerpt: Learn how to view your "undo" history using git reflog and reset your repository to a previous state.
listed: true
dateModified: 2023-05-21
---
Sometimes, `git log` doesn't cut it, especial... | code_snippets | ||
25c7a053-1674-4f56-8757-6e514bb73534 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-merged-branches.md | unknown | 965434ef-09cb-436d-b8d6-3e574b064e7c | 0 | SemanticChunker@1.0.0 | 7053202ec17c175e0165d19d78eb2b153dd7f303b4ff17aa718e1e80f53c3fd7 | ---
title: View all merged Git branches
shortTitle: View merged branches
language: git
tags: [repository,branch]
cover: cobbled-street
excerpt: Looking for a way to list all merged branches in your Git repository? Look no further.
listed: true
dateModified: 2024-04-17
---
Looking for a way to list all **merged branche... | unknown | unknown | ---
title: View all merged Git branches
shortTitle: View merged branches
language: git
tags: [repository,branch]
cover: cobbled-street
excerpt: Looking for a way to list all merged branches in your Git repository? Look no further.
listed: true
dateModified: 2024-04-17
---
Looking for a way to list all **merged branche... | ---
title: View all merged Git branches
shortTitle: View merged branches
language: git
tags: [repository,branch]
cover: cobbled-street
excerpt: Looking for a way to list all merged branches in your Git repository? Look no further.
listed: true
dateModified: 2024-04-17
---
Looking for a way to list all **merged branche... | code_snippets | ||
1fa36b9d-d9f6-407d-8bdc-1971ab48ee66 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/snippet-template.md | unknown | 7c30055b-1ba4-4cf5-9412-6e2b97bc5c6b | 0 | SemanticChunker@1.0.0 | 8e436b759b3572726bb3ab114c5f8dcc6b12d6cd4313a997c50d21362e5d59d1 | ---
title: My amazing story
shortTitle: Amazing story
language: git
tags: [branch]
cover: image
excerpt: A short summary of your story up to 140 characters long.
listed: true
dateModified: 2021-06-13
---
Write your story here. | unknown | unknown | ---
title: My amazing story
shortTitle: Amazing story
language: git
tags: [branch]
cover: image
excerpt: A short summary of your story up to 140 characters long.
listed: true
dateModified: 2021-06-13
---
Write your story here. | ---
title: My amazing story
shortTitle: Amazing story
language: git
tags: [branch]
cover: image
excerpt: A short summary of your story up to 140 characters long.
listed: true
dateModified: 2021-06-13
---
Write your story here. | code_snippets | ||
e447e966-c6af-4c29-a55a-4369a69c3658 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-last-commit.md | unknown | 9a8758cc-7ea9-4ca0-a1fd-38b3f364b230 | 0 | SemanticChunker@1.0.0 | 7bee7b7611096e8bfb05459d7e1d7977ac83c137d28e79fcbb463f9aa1f960b6 | ---
title: View the last Git commit
shortTitle: View last commit
language: git
tags: [commit]
cover: clouds-n-mountains
excerpt: Learn how to view the last commit in Git using the `git log` command.
listed: true
dateModified: 2024-04-23
---
Checking the contents of the last Git commit can sometimes be useful to orient... | unknown | unknown | ---
title: View the last Git commit
shortTitle: View last commit
language: git
tags: [commit]
cover: clouds-n-mountains
excerpt: Learn how to view the last commit in Git using the `git log` command.
listed: true
dateModified: 2024-04-23
---
Checking the contents of the last Git commit can sometimes be useful to orient... | ---
title: View the last Git commit
shortTitle: View last commit
language: git
tags: [commit]
cover: clouds-n-mountains
excerpt: Learn how to view the last commit in Git using the `git log` command.
listed: true
dateModified: 2024-04-23
---
Checking the contents of the last Git commit can sometimes be useful to orient... | code_snippets | ||
042218f3-9e67-4bcc-8068-69869660d310 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-in-date-range.md | unknown | f876d18a-f5dc-4f93-8a1b-d28e8e7524c8 | 3 | SemanticChunker@1.0.0 | 99a1071b4b630a0906734f3e30dc1c1f5259cd7847b6518e7f9a853a0b7fedb7 | [View commits between two dates > View commits until a specific date]
## View commits until a specific date
Similarly, if you only want to see commits **up to** a specific date, you can use `git log --until=<date-to>`.
```shell
# Syntax: git log --until=<date-to>
git log --until='yesterday'
# commit c191f90c7766ee6... | unknown | unknown | [View commits between two dates > View commits until a specific date]
## View commits until a specific date
Similarly, if you only want to see commits **up to** a specific date, you can use `git log --until=<date-to>`.
```shell
# Syntax: git log --until=<date-to>
git log --until='yesterday'
# commit c191f90c7766ee6... | [View commits between two dates > View commits until a specific date]
## View commits until a specific date
Similarly, if you only want to see commits **up to** a specific date, you can use `git log --until=<date-to>`.
```shell
# Syntax: git log --until=<date-to>
git log --until='yesterday'
# commit c191f90c7766ee6... | code_snippets | ||
3709385b-8ff9-44ed-8efc-39c348fe21f9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-in-date-range.md | unknown | f876d18a-f5dc-4f93-8a1b-d28e8e7524c8 | 0 | SemanticChunker@1.0.0 | 43fd7ad4fbfd5b87aa547cb3dee006d6bc081eec5e941ec393ee9afd5051fd22 | ---
title: View Git commits in a specific date range
shortTitle: View commits in date range
language: git
tags: [repository,commit]
cover: organizer
excerpt: View all commits in a specific date range using `git log`.
listed: true
dateModified: 2024-03-29
---
The `git log` command can be used for all sorts of things, i... | unknown | unknown | ---
title: View Git commits in a specific date range
shortTitle: View commits in date range
language: git
tags: [repository,commit]
cover: organizer
excerpt: View all commits in a specific date range using `git log`.
listed: true
dateModified: 2024-03-29
---
The `git log` command can be used for all sorts of things, i... | ---
title: View Git commits in a specific date range
shortTitle: View commits in date range
language: git
tags: [repository,commit]
cover: organizer
excerpt: View all commits in a specific date range using `git log`.
listed: true
dateModified: 2024-03-29
---
The `git log` command can be used for all sorts of things, i... | code_snippets | ||
c8c94c7e-7917-40e4-ac09-2c069330071e | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-in-date-range.md | unknown | f876d18a-f5dc-4f93-8a1b-d28e8e7524c8 | 2 | SemanticChunker@1.0.0 | 0dc500c95edcdd887a848af4d902625421c01b59e2255b932dd07f2f2a70489c | [View commits between two dates > View commits since a specific date]
## View commits since a specific date
Moreover, to only view commits **since** a specific date, you can use `git log --since=<date-from>`.
```shell
# Syntax: git log --since=<date-from>
git log --since='2 weeks ago'
# commit c191f90c7766ee6d5f24e... | unknown | unknown | [View commits between two dates > View commits since a specific date]
## View commits since a specific date
Moreover, to only view commits **since** a specific date, you can use `git log --since=<date-from>`.
```shell
# Syntax: git log --since=<date-from>
git log --since='2 weeks ago'
# commit c191f90c7766ee6d5f24e... | [View commits between two dates > View commits since a specific date]
## View commits since a specific date
Moreover, to only view commits **since** a specific date, you can use `git log --since=<date-from>`.
```shell
# Syntax: git log --since=<date-from>
git log --since='2 weeks ago'
# commit c191f90c7766ee6d5f24e... | code_snippets | ||
ebfee474-229e-4948-bbc8-5f97751f52e2 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-in-date-range.md | unknown | f876d18a-f5dc-4f93-8a1b-d28e8e7524c8 | 1 | SemanticChunker@1.0.0 | 11ef2a09216fab057119c0dbc366994450b48ffbcc47b8ad21ddb774ce35b1b9 | [View commits between two dates]
## View commits between two dates
Using `git log --since=<date-from> --until=<date-to>`, you can view all commits **between** `<date-from>` and `<date-to>`. The dates can be specified in a variety of formats, such as `YYYY-MM-DD`, `MM/DD/YYYY`, or even relative terms like `yesterday`,... | unknown | unknown | [View commits between two dates]
## View commits between two dates
Using `git log --since=<date-from> --until=<date-to>`, you can view all commits **between** `<date-from>` and `<date-to>`. The dates can be specified in a variety of formats, such as `YYYY-MM-DD`, `MM/DD/YYYY`, or even relative terms like `yesterday`,... | [View commits between two dates]
## View commits between two dates
Using `git log --since=<date-from> --until=<date-to>`, you can view all commits **between** `<date-from>` and `<date-to>`. The dates can be specified in a variety of formats, such as `YYYY-MM-DD`, `MM/DD/YYYY`, or even relative terms like `yesterday`,... | code_snippets | ||
be8c147a-1d6f-4f6b-bd9b-debe8534d8c3 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-by-string.md | unknown | 5d497f65-708c-4514-98d9-9fc71c83a9da | 0 | SemanticChunker@1.0.0 | c20b9bb8a7de30066bf818d636d0b192e996294b13b57fb8e92740b55d1a778e | ---
title: View Git commits that manipulated a specific string
shortTitle: View commits that manipulated a string
language: git
tags: [commit]
cover: bunny-poster
excerpt: Learn how to view all commits that manipulated a specific string in a Git repository.
listed: true
dateModified: 2024-04-26
---
Finding all commits... | unknown | unknown | ---
title: View Git commits that manipulated a specific string
shortTitle: View commits that manipulated a string
language: git
tags: [commit]
cover: bunny-poster
excerpt: Learn how to view all commits that manipulated a specific string in a Git repository.
listed: true
dateModified: 2024-04-26
---
Finding all commits... | ---
title: View Git commits that manipulated a specific string
shortTitle: View commits that manipulated a string
language: git
tags: [commit]
cover: bunny-poster
excerpt: Learn how to view all commits that manipulated a specific string in a Git repository.
listed: true
dateModified: 2024-04-26
---
Finding all commits... | code_snippets | ||
21409d90-b329-4ccf-b543-aec9e6e395b9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-differences.md | unknown | 3ff94208-d50b-421e-b3e3-4e68ff4b1a29 | 0 | SemanticChunker@1.0.0 | d7127a02078331ab844571cc71fe9ba68811402d30536d054216c3018eb6f059 | ---
title: View differences in Git changes
shortTitle: View differences in changes
language: git
tags: [commit,branch]
cover: plant-candle
excerpt: View differences between staged or unstaged changes and the last commit in Git.
listed: true
dateModified: 2024-04-21
---
When working with Git, you'll often need to view ... | unknown | unknown | ---
title: View differences in Git changes
shortTitle: View differences in changes
language: git
tags: [commit,branch]
cover: plant-candle
excerpt: View differences between staged or unstaged changes and the last commit in Git.
listed: true
dateModified: 2024-04-21
---
When working with Git, you'll often need to view ... | ---
title: View differences in Git changes
shortTitle: View differences in changes
language: git
tags: [commit,branch]
cover: plant-candle
excerpt: View differences between staged or unstaged changes and the last commit in Git.
listed: true
dateModified: 2024-04-21
---
When working with Git, you'll often need to view ... | code_snippets | ||
061c0b50-44b5-46a0-8aa6-386187db738f | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-by-author-or-committer.md | unknown | b1cc4df5-a244-45e4-8544-14a1fca63ce3 | 1 | SemanticChunker@1.0.0 | 04c6f9d7591ff50d17adcac0a4d14a4da8e2305cdbe47212c55abf59bfdb3a24 | [View commits by a specific author]
## View commits by a specific author
When you're looking for commits made by a **specific author**, you can use `git log --author=<author>` to filter the commit history. Replace `<author>` with the name of the author you're interested in.
```shell
# Syntax: git log --author=<autho... | unknown | unknown | [View commits by a specific author]
## View commits by a specific author
When you're looking for commits made by a **specific author**, you can use `git log --author=<author>` to filter the commit history. Replace `<author>` with the name of the author you're interested in.
```shell
# Syntax: git log --author=<autho... | [View commits by a specific author]
## View commits by a specific author
When you're looking for commits made by a **specific author**, you can use `git log --author=<author>` to filter the commit history. Replace `<author>` with the name of the author you're interested in.
```shell
# Syntax: git log --author=<autho... | code_snippets | ||
28c2ce51-a48a-4dd3-9439-df9f626f7f0e | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-by-author-or-committer.md | unknown | b1cc4df5-a244-45e4-8544-14a1fca63ce3 | 0 | SemanticChunker@1.0.0 | 8919bc6a84a5c8e3a210ce4eff746614cbcf6851f22c52d556cebfbb125802c0 | ---
title: View Git commits by a certain author or committer
shortTitle: View commits by author or committer
language: git
tags: [repository,commit]
cover: comic-glasses
excerpt: If you're looking for a way to find commits by a specific author or committer in a Git repository, look no further.
listed: true
dateModified... | unknown | unknown | ---
title: View Git commits by a certain author or committer
shortTitle: View commits by author or committer
language: git
tags: [repository,commit]
cover: comic-glasses
excerpt: If you're looking for a way to find commits by a specific author or committer in a Git repository, look no further.
listed: true
dateModified... | ---
title: View Git commits by a certain author or committer
shortTitle: View commits by author or committer
language: git
tags: [repository,commit]
cover: comic-glasses
excerpt: If you're looking for a way to find commits by a specific author or committer in a Git repository, look no further.
listed: true
dateModified... | code_snippets | ||
3a85d213-7e7f-410b-a383-d364d660365a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/view-commits-by-author-or-committer.md | unknown | b1cc4df5-a244-45e4-8544-14a1fca63ce3 | 2 | SemanticChunker@1.0.0 | c93dac05c075652116f7047e1e68177e4bc42af1358da2256552742fbb2218ae | [View commits by a specific author > View commits by a specific committer]
## View commits by a specific committer
Similarly, to filter commits by a **specific committer**, you can use `git log --committer=<committer>`, replacing `<committer>` with the name of the committer you're interested in.
```shell
# Syntax: g... | unknown | unknown | [View commits by a specific author > View commits by a specific committer]
## View commits by a specific committer
Similarly, to filter commits by a **specific committer**, you can use `git log --committer=<committer>`, replacing `<committer>` with the name of the committer you're interested in.
```shell
# Syntax: g... | [View commits by a specific author > View commits by a specific committer]
## View commits by a specific committer
Similarly, to filter commits by a **specific committer**, you can use `git log --committer=<committer>`, replacing `<committer>` with the name of the committer you're interested in.
```shell
# Syntax: g... | code_snippets | ||
47675a0f-b869-455e-84d8-3170975d6f77 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/head-links.md | unknown | 6b1dda09-efb7-47ba-9730-eaf4401bc868 | 1 | SemanticChunker@1.0.0 | 3fcd0eb254ea10710c99bcbba37721514a950655c29ed90e6fc92dc17bdb4113 | - The `canonical` link element tells search engines which URL is the **canonical version** of the page. This helps prevent duplicate content issues and ensures that the correct page is indexed.
- The `sitemap` link element tells search engines where to find the **sitemap** for the website. Sitemaps are XML files that c... | unknown | unknown | - The `canonical` link element tells search engines which URL is the **canonical version** of the page. This helps prevent duplicate content issues and ensures that the correct page is indexed.
- The `sitemap` link element tells search engines where to find the **sitemap** for the website. Sitemaps are XML files that c... | - The `canonical` link element tells search engines which URL is the **canonical version** of the page. This helps prevent duplicate content issues and ensures that the correct page is indexed.
- The `sitemap` link element tells search engines where to find the **sitemap** for the website. Sitemaps are XML files that c... | code_snippets | ||
bcfe2af7-6cd6-47f2-a878-bbfc4fdf4c7b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/head-links.md | unknown | 6b1dda09-efb7-47ba-9730-eaf4401bc868 | 0 | SemanticChunker@1.0.0 | eb41c68f582c968ac775c037504c54442ab8cdf3976e83823be4e77576e0b23d | ---
title: Recommended HTML head links
shortTitle: HTML head links template
language: html
tags: [metadata,head]
cover: boutique-home-office-4
excerpt: Make your HTML documents more SEO-friendly by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-26
---
The `<head>` element of an HTML... | unknown | unknown | ---
title: Recommended HTML head links
shortTitle: HTML head links template
language: html
tags: [metadata,head]
cover: boutique-home-office-4
excerpt: Make your HTML documents more SEO-friendly by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-26
---
The `<head>` element of an HTML... | ---
title: Recommended HTML head links
shortTitle: HTML head links template
language: html
tags: [metadata,head]
cover: boutique-home-office-4
excerpt: Make your HTML documents more SEO-friendly by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-26
---
The `<head>` element of an HTML... | code_snippets | ||
1298839b-5cb2-44db-8957-46712ac2e99a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/image-alt.md | unknown | 8b0e1dcb-d602-42b2-83c2-aa68e9c2e0b2 | 1 | SemanticChunker@1.0.0 | 710ee01262864506c8c215403931a7ddccd404a56b87e1a226bae95dd1ab2797 | [How to write good alt text]
## How to write good alt text
The `alt` attribute should be used to describe the image in a way that makes sense to **someone who cannot see it**. Descriptions must be accurate and concise. Some screen readers are known to cut off descriptions after **125 characters**, so it is best to ke... | unknown | unknown | [How to write good alt text]
## How to write good alt text
The `alt` attribute should be used to describe the image in a way that makes sense to **someone who cannot see it**. Descriptions must be accurate and concise. Some screen readers are known to cut off descriptions after **125 characters**, so it is best to ke... | [How to write good alt text]
## How to write good alt text
The `alt` attribute should be used to describe the image in a way that makes sense to **someone who cannot see it**. Descriptions must be accurate and concise. Some screen readers are known to cut off descriptions after **125 characters**, so it is best to ke... | code_snippets | ||
428ea1ff-1030-4cc5-8053-2ca2f8f02f54 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/image-alt.md | unknown | 8b0e1dcb-d602-42b2-83c2-aa68e9c2e0b2 | 0 | SemanticChunker@1.0.0 | 36a0d82c22f3d3432dac5939aaebb1dc4ea28675342a762dff9d8a584a7c6750 | ---
title: What is the purpose of the alt attribute on images?
shortTitle: Image alt attribute
language: html
tags: [image,accessibility]
cover: sailing-alone
excerpt: Learn how to correctly use the `alt` attribute on images in HTML.
listed: true
dateModified: 2023-06-25
---
The `alt` attribute provides **alternative ... | unknown | unknown | ---
title: What is the purpose of the alt attribute on images?
shortTitle: Image alt attribute
language: html
tags: [image,accessibility]
cover: sailing-alone
excerpt: Learn how to correctly use the `alt` attribute on images in HTML.
listed: true
dateModified: 2023-06-25
---
The `alt` attribute provides **alternative ... | ---
title: What is the purpose of the alt attribute on images?
shortTitle: Image alt attribute
language: html
tags: [image,accessibility]
cover: sailing-alone
excerpt: Learn how to correctly use the `alt` attribute on images in HTML.
listed: true
dateModified: 2023-06-25
---
The `alt` attribute provides **alternative ... | code_snippets | ||
b742035b-b49a-48b2-a592-b911150a455c | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/image-alt.md | unknown | 8b0e1dcb-d602-42b2-83c2-aa68e9c2e0b2 | 2 | SemanticChunker@1.0.0 | 855777585bb31e4b96216bf0e0e82124e4f77b506ab9af960d0b6ac7858e8254 | [How to write good alt text > What if the image is purely decorative?]
## What if the image is purely decorative?
If an image is **purely decorative**, then it is best to leave the `alt` attribute **empty**. This will tell screen readers to skip over the image.
```html
<img src="decorative.jpg" alt="">
```
Notice i... | unknown | unknown | [How to write good alt text > What if the image is purely decorative?]
## What if the image is purely decorative?
If an image is **purely decorative**, then it is best to leave the `alt` attribute **empty**. This will tell screen readers to skip over the image.
```html
<img src="decorative.jpg" alt="">
```
Notice i... | [How to write good alt text > What if the image is purely decorative?]
## What if the image is purely decorative?
If an image is **purely decorative**, then it is best to leave the `alt` attribute **empty**. This will tell screen readers to skip over the image.
```html
<img src="decorative.jpg" alt="">
```
Notice i... | code_snippets | ||
16d3244e-1ce2-47ee-afce-97d508e01773 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/custom-file-download-names.md | unknown | 19e41067-aa76-4166-a7cb-bb545193e3e2 | 0 | SemanticChunker@1.0.0 | 0001499d94a62d4159bfa399c77168dc6759cb13203fb22d624b68fd74e3712b | ---
title: Customize the names of downloadable files
language: html
tags: [link]
cover: hard-disk
excerpt: Learn what HTML5 attribute you can use to customize the names of your downloadable files with this quick tip.
listed: true
dateModified: 2021-06-12
---
HTML5 introduced a variety of convenient features that many ... | unknown | unknown | ---
title: Customize the names of downloadable files
language: html
tags: [link]
cover: hard-disk
excerpt: Learn what HTML5 attribute you can use to customize the names of your downloadable files with this quick tip.
listed: true
dateModified: 2021-06-12
---
HTML5 introduced a variety of convenient features that many ... | ---
title: Customize the names of downloadable files
language: html
tags: [link]
cover: hard-disk
excerpt: Learn what HTML5 attribute you can use to customize the names of your downloadable files with this quick tip.
listed: true
dateModified: 2021-06-12
---
HTML5 introduced a variety of convenient features that many ... | code_snippets | ||
fd7176c7-1de7-421c-bece-4234537a0386 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/details-accordion.md | unknown | 6729b9b0-1592-4ebb-9efd-4c79624bc89e | 0 | SemanticChunker@1.0.0 | 1f53cb74cd284f96ca3bb8bd34a2cd58f8a12d53625c0f943644d03742c4b493 | ---
title: Creating accordion-style content without JavaScript
shortTitle: Details accordion content
language: html
tags: [content,interactivity]
cover: flower-portrait-10
excerpt: Did you know you don't need JavaScript to create accordion-style content? Here's how to do it with the details element.
listed: true
dateMo... | unknown | unknown | ---
title: Creating accordion-style content without JavaScript
shortTitle: Details accordion content
language: html
tags: [content,interactivity]
cover: flower-portrait-10
excerpt: Did you know you don't need JavaScript to create accordion-style content? Here's how to do it with the details element.
listed: true
dateMo... | ---
title: Creating accordion-style content without JavaScript
shortTitle: Details accordion content
language: html
tags: [content,interactivity]
cover: flower-portrait-10
excerpt: Did you know you don't need JavaScript to create accordion-style content? Here's how to do it with the details element.
listed: true
dateMo... | code_snippets | ||
34b513d0-765b-485f-8ceb-5cc3b14899d9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/head-icons.md | unknown | bf773067-943b-4cc9-933c-07d837ae69e9 | 0 | SemanticChunker@1.0.0 | c69509c5a4b2dc9f5309b8c1a3607200f93f7b76d95a63b1ce43d327472ec23b | ---
title: Recommended HTML head icon tags
shortTitle: HTML favicons template
language: html
tags: [metadata,head]
cover: boutique-home-office-3
excerpt: Ensure your HTML documents have a proper favicon by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-24
---
Over the years, I've se... | unknown | unknown | ---
title: Recommended HTML head icon tags
shortTitle: HTML favicons template
language: html
tags: [metadata,head]
cover: boutique-home-office-3
excerpt: Ensure your HTML documents have a proper favicon by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-24
---
Over the years, I've se... | ---
title: Recommended HTML head icon tags
shortTitle: HTML favicons template
language: html
tags: [metadata,head]
cover: boutique-home-office-3
excerpt: Ensure your HTML documents have a proper favicon by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-24
---
Over the years, I've se... | code_snippets | ||
59d5f016-e5e6-42c9-931e-30e2742be278 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/head-social-tags.md | unknown | c89ca58a-3c91-4524-bd00-513742a976ce | 1 | SemanticChunker@1.0.0 | 5db66f4da5cfdc2ae5b422246d4e4fdc727a669aa8df3527d01aff06f2df2d85 | - The `og:title` and `twitter:title` meta tags are used to display the page's title in the preview.
- The `og:description` and `twitter:description` meta tags are used to display a short description of the page in the preview.
- The `og:image` and `twitter:image` meta tags are used to display an image in the preview.
-... | unknown | unknown | - The `og:title` and `twitter:title` meta tags are used to display the page's title in the preview.
- The `og:description` and `twitter:description` meta tags are used to display a short description of the page in the preview.
- The `og:image` and `twitter:image` meta tags are used to display an image in the preview.
-... | - The `og:title` and `twitter:title` meta tags are used to display the page's title in the preview.
- The `og:description` and `twitter:description` meta tags are used to display a short description of the page in the preview.
- The `og:image` and `twitter:image` meta tags are used to display an image in the preview.
-... | code_snippets | ||
6734fc89-930a-4be0-a854-5e9391ced1d9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/head-social-tags.md | unknown | c89ca58a-3c91-4524-bd00-513742a976ce | 0 | SemanticChunker@1.0.0 | 2328895a3f17f5c416eaecdf03b3aa9a81c236206cd046fb043a953d997bd73c | ---
title: Recommended social tags for HTML head
shortTitle: HTML social tags template
language: html
tags: [metadata,head]
cover: boutique-home-office-2
excerpt: Ensure your HTML documents can be shared on social media by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-22
---
Social... | unknown | unknown | ---
title: Recommended social tags for HTML head
shortTitle: HTML social tags template
language: html
tags: [metadata,head]
cover: boutique-home-office-2
excerpt: Ensure your HTML documents can be shared on social media by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-22
---
Social... | ---
title: Recommended social tags for HTML head
shortTitle: HTML social tags template
language: html
tags: [metadata,head]
cover: boutique-home-office-2
excerpt: Ensure your HTML documents can be shared on social media by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-22
---
Social... | code_snippets | ||
1f9cf42f-37e0-409e-9cf2-1fd452cfb686 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/async-defer.md | unknown | 582772cf-a406-42d2-b02f-e457706deed5 | 1 | SemanticChunker@1.0.0 | 2cc6295fedcf38f8f7e21155e296d9f666d655633b819af425715aeb150f9dbe | [No attributes]
## No attributes
More often than not, a plain `<script>` tag without attributes is what most people tend to start with. This implements the default browser behavior. The HTML will be parsed until the script tag is encountered. At this point, HTML parsing will be paused and the script will be loaded. T... | unknown | unknown | [No attributes]
## No attributes
More often than not, a plain `<script>` tag without attributes is what most people tend to start with. This implements the default browser behavior. The HTML will be parsed until the script tag is encountered. At this point, HTML parsing will be paused and the script will be loaded. T... | [No attributes]
## No attributes
More often than not, a plain `<script>` tag without attributes is what most people tend to start with. This implements the default browser behavior. The HTML will be parsed until the script tag is encountered. At this point, HTML parsing will be paused and the script will be loaded. T... | code_snippets | ||
2dc5c433-7fa5-414a-aaad-74090d752bf7 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/async-defer.md | unknown | 582772cf-a406-42d2-b02f-e457706deed5 | 2 | SemanticChunker@1.0.0 | e278d4f898541717504946cc07e4f06175345f377e100c50690375fecee15eff | [No attributes > The async attribute]
## The async attribute
To avoid a long pause in HTML parsing, the `async` attribute can be leveraged. This ensures that, when the script is encountered, parsing doesn't pause right away. Instead, the script is loaded in the background and only the HTML parsing is paused to execut... | unknown | unknown | [No attributes > The async attribute]
## The async attribute
To avoid a long pause in HTML parsing, the `async` attribute can be leveraged. This ensures that, when the script is encountered, parsing doesn't pause right away. Instead, the script is loaded in the background and only the HTML parsing is paused to execut... | [No attributes > The async attribute]
## The async attribute
To avoid a long pause in HTML parsing, the `async` attribute can be leveraged. This ensures that, when the script is encountered, parsing doesn't pause right away. Instead, the script is loaded in the background and only the HTML parsing is paused to execut... | code_snippets | ||
432b116a-7417-4a26-a280-18cf1fb471ae | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/async-defer.md | unknown | 582772cf-a406-42d2-b02f-e457706deed5 | 0 | SemanticChunker@1.0.0 | 8f1a28f55dabd39dce1e78769015dac99394a535561bd699f041a164f44fa149 | ---
title: What is the difference between async and defer in script loading?
shortTitle: Async and defer
language: html
tags: [script,javascript]
cover: coworking-space
excerpt: Understanding how to correctly load your JavaScript files can significantly improve your web application's performance.
listed: true
dateModif... | unknown | unknown | ---
title: What is the difference between async and defer in script loading?
shortTitle: Async and defer
language: html
tags: [script,javascript]
cover: coworking-space
excerpt: Understanding how to correctly load your JavaScript files can significantly improve your web application's performance.
listed: true
dateModif... | ---
title: What is the difference between async and defer in script loading?
shortTitle: Async and defer
language: html
tags: [script,javascript]
cover: coworking-space
excerpt: Understanding how to correctly load your JavaScript files can significantly improve your web application's performance.
listed: true
dateModif... | code_snippets | ||
db11f50b-169d-43b9-9f4c-30b7bc6207a4 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/async-defer.md | unknown | 582772cf-a406-42d2-b02f-e457706deed5 | 3 | SemanticChunker@1.0.0 | 8b1a742a24318a1ed7bbd3b37b4431f5c430f2f1bfebb310f9b0e8e10abc3b78 | [No attributes > The defer attribute]
## The defer attribute
Finally, the `defer` attribute builds on top of the previous behavior to guarantee order of execution for scripts. As previously, scripts are loaded in the background as they are encountered. When the HTML parsing finishes, they are then executed in order.
... | unknown | unknown | [No attributes > The defer attribute]
## The defer attribute
Finally, the `defer` attribute builds on top of the previous behavior to guarantee order of execution for scripts. As previously, scripts are loaded in the background as they are encountered. When the HTML parsing finishes, they are then executed in order.
... | [No attributes > The defer attribute]
## The defer attribute
Finally, the `defer` attribute builds on top of the previous behavior to guarantee order of execution for scripts. As previously, scripts are loaded in the background as they are encountered. When the HTML parsing finishes, they are then executed in order.
... | code_snippets | ||
18e8c0ba-aa02-4676-80d0-d1b53bde1024 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/alt-vs-title.md | unknown | b9aaefed-6972-4d4e-8979-5400669ed432 | 0 | SemanticChunker@1.0.0 | 26b19dae122e160793c99e97d2842b2d9e996b767801ac1ebc7e5ea2ca73a75e | ---
title: What is the difference between alt and title?
shortTitle: Difference between alt and title
language: html
tags: [image]
cover: stars-n-snow
excerpt: Learn the difference between the `alt` and `title` attributes on images in HTML.
listed: true
dateModified: 2023-07-02
---
As mention in the [previous article]... | unknown | unknown | ---
title: What is the difference between alt and title?
shortTitle: Difference between alt and title
language: html
tags: [image]
cover: stars-n-snow
excerpt: Learn the difference between the `alt` and `title` attributes on images in HTML.
listed: true
dateModified: 2023-07-02
---
As mention in the [previous article]... | ---
title: What is the difference between alt and title?
shortTitle: Difference between alt and title
language: html
tags: [image]
cover: stars-n-snow
excerpt: Learn the difference between the `alt` and `title` attributes on images in HTML.
listed: true
dateModified: 2023-07-02
---
As mention in the [previous article]... | code_snippets | ||
06b1f903-a2c6-46c7-a6c9-dadc1c4635db | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 0 | SemanticChunker@1.0.0 | ab1222264fa781c3ea0449ac8a2577ca9bdc8a5e2cef7b36d52a1108bf56dc0a | ---
title: 8 tips for accessible websites
shortTitle: Accessibility tips
language: html
tags: [accessibility,form,link,metadata]
cover: accessibility
excerpt: Accessibility (a11y) can improve your website and attract new users. Learn how to get started with these 8 quick tips.
listed: true
dateModified: 2021-06-12
--- | unknown | unknown | ---
title: 8 tips for accessible websites
shortTitle: Accessibility tips
language: html
tags: [accessibility,form,link,metadata]
cover: accessibility
excerpt: Accessibility (a11y) can improve your website and attract new users. Learn how to get started with these 8 quick tips.
listed: true
dateModified: 2021-06-12
--- | ---
title: 8 tips for accessible websites
shortTitle: Accessibility tips
language: html
tags: [accessibility,form,link,metadata]
cover: accessibility
excerpt: Accessibility (a11y) can improve your website and attract new users. Learn how to get started with these 8 quick tips.
listed: true
dateModified: 2021-06-12
--- | code_snippets | ||
09005a10-053b-43c4-95de-75aa07c181a2 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 1 | SemanticChunker@1.0.0 | 5514117f1e09a88cb16530ecf6c482d876ebe82486632ce26a67ac2f174e35ea | [Use semantic HTML]
## Use semantic HTML
HTML5 introduced a variety of new semantic HTML elements to help replace the much dreaded `<div>`, such as `<section>`, `<main>`, `<article>`, `<nav>` etc. When developing a website, you should understand what each part of your layout represents and try to use the appropriate ... | unknown | unknown | [Use semantic HTML]
## Use semantic HTML
HTML5 introduced a variety of new semantic HTML elements to help replace the much dreaded `<div>`, such as `<section>`, `<main>`, `<article>`, `<nav>` etc. When developing a website, you should understand what each part of your layout represents and try to use the appropriate ... | [Use semantic HTML]
## Use semantic HTML
HTML5 introduced a variety of new semantic HTML elements to help replace the much dreaded `<div>`, such as `<section>`, `<main>`, `<article>`, `<nav>` etc. When developing a website, you should understand what each part of your layout represents and try to use the appropriate ... | code_snippets | ||
0e8d57be-6e06-40d2-ac03-aa6eb32878b7 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 6 | SemanticChunker@1.0.0 | 3ef9c241aadcb58509e88be251fc35e98804856036a5b3b77f41093a7a9d236b | [Use semantic HTML > Label your inputs]
## Label your inputs
Any kind of `<input>` element should be labelled appropriately, using either a `<label>` wrapper, the `for` attribute or an `aria-label` attribute. Do not rely on `placeholder` attributes to convey meaning about your `<input>` elements as this will cause pr... | unknown | unknown | [Use semantic HTML > Label your inputs]
## Label your inputs
Any kind of `<input>` element should be labelled appropriately, using either a `<label>` wrapper, the `for` attribute or an `aria-label` attribute. Do not rely on `placeholder` attributes to convey meaning about your `<input>` elements as this will cause pr... | [Use semantic HTML > Label your inputs]
## Label your inputs
Any kind of `<input>` element should be labelled appropriately, using either a `<label>` wrapper, the `for` attribute or an `aria-label` attribute. Do not rely on `placeholder` attributes to convey meaning about your `<input>` elements as this will cause pr... | code_snippets | ||
0fd7ba8a-223e-4893-9be2-ba78ee11251b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 5 | SemanticChunker@1.0.0 | cb6b41b0f3f4094bd7d047d13a398068dd4b8c02653dcf09e748f2d9ed5a3a00 | [Use semantic HTML > Be consistent]
## Be consistent
Elements with similar meaning and/or functionality should look similar across your website. This is especially true for `<a>` and `<button>` elements and their respective states as users will have to be able to identify easily what elements they can interact with a... | unknown | unknown | [Use semantic HTML > Be consistent]
## Be consistent
Elements with similar meaning and/or functionality should look similar across your website. This is especially true for `<a>` and `<button>` elements and their respective states as users will have to be able to identify easily what elements they can interact with a... | [Use semantic HTML > Be consistent]
## Be consistent
Elements with similar meaning and/or functionality should look similar across your website. This is especially true for `<a>` and `<button>` elements and their respective states as users will have to be able to identify easily what elements they can interact with a... | code_snippets | ||
2d9865e5-639b-406c-8c9e-869df38dc09b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 7 | SemanticChunker@1.0.0 | e529bce3ff15172e6c5cdb8b1b4a32ee24ae653c6e9ecca5a1f20a661a1474d8 | [Use semantic HTML > Design responsively]
## Design responsively
Responsiveness is often thought in terms of screen size or mobile vs desktop, but there are many different devices where a user could browse your website. Try catering to any and all of them by providing ways to navigate and use your application via mou... | unknown | unknown | [Use semantic HTML > Design responsively]
## Design responsively
Responsiveness is often thought in terms of screen size or mobile vs desktop, but there are many different devices where a user could browse your website. Try catering to any and all of them by providing ways to navigate and use your application via mou... | [Use semantic HTML > Design responsively]
## Design responsively
Responsiveness is often thought in terms of screen size or mobile vs desktop, but there are many different devices where a user could browse your website. Try catering to any and all of them by providing ways to navigate and use your application via mou... | code_snippets | ||
9ee84e5f-d525-4559-8f78-7d5c3146c7b7 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 3 | SemanticChunker@1.0.0 | 235bf49fa5dfc2f00175db98bfa7f3f07aa23faaaa542ccba0a9c5bf2e755e88 | [Use semantic HTML > Caption images and video]
## Caption images and video
Try to provide `alt` attributes for your `<img>` elements, so that screenreaders don't read the `src` attribute. You can use empty `alt` attributes for decorative images, which will inform screenreaders to skip them. Similarly, try to provide ... | unknown | unknown | [Use semantic HTML > Caption images and video]
## Caption images and video
Try to provide `alt` attributes for your `<img>` elements, so that screenreaders don't read the `src` attribute. You can use empty `alt` attributes for decorative images, which will inform screenreaders to skip them. Similarly, try to provide ... | [Use semantic HTML > Caption images and video]
## Caption images and video
Try to provide `alt` attributes for your `<img>` elements, so that screenreaders don't read the `src` attribute. You can use empty `alt` attributes for decorative images, which will inform screenreaders to skip them. Similarly, try to provide ... | code_snippets | ||
c466aa3b-cc10-4bd2-8d33-bbad3be5ed2d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 2 | SemanticChunker@1.0.0 | 254016733f5457507e56aa2000226c12aeb44c2660422de7bed2b784ae739d15 | [Use semantic HTML > Use color correctly]
## Use color correctly
[WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/) specifies a minimum contrast ratio of `4.5:1` between text and background (viewable in Chrome Developer Tools), so you should always design with that in mind. Additionally, remember that color sh... | unknown | unknown | [Use semantic HTML > Use color correctly]
## Use color correctly
[WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/) specifies a minimum contrast ratio of `4.5:1` between text and background (viewable in Chrome Developer Tools), so you should always design with that in mind. Additionally, remember that color sh... | [Use semantic HTML > Use color correctly]
## Use color correctly
[WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/) specifies a minimum contrast ratio of `4.5:1` between text and background (viewable in Chrome Developer Tools), so you should always design with that in mind. Additionally, remember that color sh... | code_snippets | ||
d3896737-e8a8-48bb-b7bc-da73d979ef56 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 4 | SemanticChunker@1.0.0 | 8000823028d077ee02a449f29a11a093036cbbf1066cd02e21115642318e2029 | [Use semantic HTML > Show and tell]
## Show and tell
Using icons and colors to indicate state, highlight or provide context is very common and provides a nice user experience. However, icons and colors alone might not be accessible for everyone, so make sure to support them with the appropriate text literals, caterin... | unknown | unknown | [Use semantic HTML > Show and tell]
## Show and tell
Using icons and colors to indicate state, highlight or provide context is very common and provides a nice user experience. However, icons and colors alone might not be accessible for everyone, so make sure to support them with the appropriate text literals, caterin... | [Use semantic HTML > Show and tell]
## Show and tell
Using icons and colors to indicate state, highlight or provide context is very common and provides a nice user experience. However, icons and colors alone might not be accessible for everyone, so make sure to support them with the appropriate text literals, caterin... | code_snippets | ||
ebe1beba-e4e0-495f-a288-792e109456a7 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/8-tips-for-accessible-websites.md | unknown | 47e448ae-f031-488e-ae9a-c1609f2b748c | 8 | SemanticChunker@1.0.0 | 32cec51a3c6f7235e84ab56712b1e99618742545539a0ac7e8a9ef63bae5e5bc | [Use semantic HTML > Organize your content]
## Organize your content
A website's layout should be easy to scan, understand and find the content that is relevant to the user. Good organization with clear sections and properly grouped content provides a better user experience for all users, regardless of device or acce... | unknown | unknown | [Use semantic HTML > Organize your content]
## Organize your content
A website's layout should be easy to scan, understand and find the content that is relevant to the user. Good organization with clear sections and properly grouped content provides a better user experience for all users, regardless of device or acce... | [Use semantic HTML > Organize your content]
## Organize your content
A website's layout should be easy to scan, understand and find the content that is relevant to the user. Good organization with clear sections and properly grouped content provides a better user experience for all users, regardless of device or acce... | code_snippets | ||
59f0d652-ab2d-488b-b532-798733aab525 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/data-attributes-as-state.md | unknown | 31efa243-afab-419f-89d9-65120eb2d8f9 | 3 | SemanticChunker@1.0.0 | 6d0bc40c6de0aa7b2bb782bf23af1f10d992faf3221fbd82f3371997cb8eef86 | [The problems with HTML classes > A better approach using data attributes]
## A better approach using data attributes
What if I told you there's a better way? And it has been there all along, for many years. I'm talking about **data attributes**. Let's take a look at how we can use them to represent the state of our ... | unknown | unknown | [The problems with HTML classes > A better approach using data attributes]
## A better approach using data attributes
What if I told you there's a better way? And it has been there all along, for many years. I'm talking about **data attributes**. Let's take a look at how we can use them to represent the state of our ... | [The problems with HTML classes > A better approach using data attributes]
## A better approach using data attributes
What if I told you there's a better way? And it has been there all along, for many years. I'm talking about **data attributes**. Let's take a look at how we can use them to represent the state of our ... | code_snippets | ||
64829673-9800-44ea-8d25-fbde1864f07a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/data-attributes-as-state.md | unknown | 31efa243-afab-419f-89d9-65120eb2d8f9 | 4 | SemanticChunker@1.0.0 | a8fd562684ad0a9dfa8d74fcad8762c20aed6b5801e479e538c120b835015e7b | [The problems with HTML classes > A better approach using data attributes]
But what's even more interesting is we can't run into the previous issue of having two states on the same element. This is because **the data attribute selector needs to match exactly**, otherwise it won't work. So, if we have an element with s... | unknown | unknown | [The problems with HTML classes > A better approach using data attributes]
But what's even more interesting is we can't run into the previous issue of having two states on the same element. This is because **the data attribute selector needs to match exactly**, otherwise it won't work. So, if we have an element with s... | [The problems with HTML classes > A better approach using data attributes]
But what's even more interesting is we can't run into the previous issue of having two states on the same element. This is because **the data attribute selector needs to match exactly**, otherwise it won't work. So, if we have an element with s... | code_snippets | ||
77414c7b-1f59-4aa3-8d0e-c49ed285071f | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/data-attributes-as-state.md | unknown | 31efa243-afab-419f-89d9-65120eb2d8f9 | 2 | SemanticChunker@1.0.0 | 4be2277ba3a132d9b4c492ec5143b1b070b4783ecd3054458c32ce4986cab458 | [The problems with HTML classes]
Pretty simple and easy to understand. What if, however, by some twist of fate, we end up with some faulty data from the server? What if the order is both loading and completed? Perhaps it's completed but also contains an error? What will the UI look like then? CSS will use its **cascad... | unknown | unknown | [The problems with HTML classes]
Pretty simple and easy to understand. What if, however, by some twist of fate, we end up with some faulty data from the server? What if the order is both loading and completed? Perhaps it's completed but also contains an error? What will the UI look like then? CSS will use its **cascad... | [The problems with HTML classes]
Pretty simple and easy to understand. What if, however, by some twist of fate, we end up with some faulty data from the server? What if the order is both loading and completed? Perhaps it's completed but also contains an error? What will the UI look like then? CSS will use its **cascad... | code_snippets | ||
9251f436-8dd9-450c-95f3-4fa95e7ab9d6 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/data-attributes-as-state.md | unknown | 31efa243-afab-419f-89d9-65120eb2d8f9 | 5 | SemanticChunker@1.0.0 | 38aa058c2907b83c7e1627558a046802257266489a87626ff3733802f1d72cdc | [The problems with HTML classes > Conclusion]
## Conclusion
As you can see, using data attributes to represent state in HTML is more **flexible** and **scalable** than using classes. It forces us to be more **explicit** and more **debuggable**. I think it's a great alternative to using classes, and I hope you'll cons... | unknown | unknown | [The problems with HTML classes > Conclusion]
## Conclusion
As you can see, using data attributes to represent state in HTML is more **flexible** and **scalable** than using classes. It forces us to be more **explicit** and more **debuggable**. I think it's a great alternative to using classes, and I hope you'll cons... | [The problems with HTML classes > Conclusion]
## Conclusion
As you can see, using data attributes to represent state in HTML is more **flexible** and **scalable** than using classes. It forces us to be more **explicit** and more **debuggable**. I think it's a great alternative to using classes, and I hope you'll cons... | code_snippets | ||
ab89eef5-8f41-4fca-bd15-ba874240dbd2 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/data-attributes-as-state.md | unknown | 31efa243-afab-419f-89d9-65120eb2d8f9 | 0 | SemanticChunker@1.0.0 | 67b16d5fc2c27c9f81dece0fc11b220799e528033083f09987d69fc7cc94890d | ---
title: Use data attributes instead of HTML classes to represent state
shortTitle: Data attributes as state
language: html
tags: [css,javascript]
cover: pineapple-on-the-rocks
excerpt: Learn how to use data attributes to represent UI state and level up your HTML and CSS game.
listed: true
dateModified: 2023-11-13
--... | unknown | unknown | ---
title: Use data attributes instead of HTML classes to represent state
shortTitle: Data attributes as state
language: html
tags: [css,javascript]
cover: pineapple-on-the-rocks
excerpt: Learn how to use data attributes to represent UI state and level up your HTML and CSS game.
listed: true
dateModified: 2023-11-13
--... | ---
title: Use data attributes instead of HTML classes to represent state
shortTitle: Data attributes as state
language: html
tags: [css,javascript]
cover: pineapple-on-the-rocks
excerpt: Learn how to use data attributes to represent UI state and level up your HTML and CSS game.
listed: true
dateModified: 2023-11-13
--... | code_snippets | ||
f18a48f2-9974-4c1f-baab-c8171df1cdfb | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/data-attributes-as-state.md | unknown | 31efa243-afab-419f-89d9-65120eb2d8f9 | 1 | SemanticChunker@1.0.0 | 2f782d6350ab75811d59d9868b161c25e5e51d07982b6fed5301c6b480ced89d | [The problems with HTML classes]
## The problems with HTML classes
More often than not, when representing **UI state in HTML**, we use classes. This often translates into React components or JavaScript code that check a handful of conditions and **add or remove classes** accordingly. Let's look at an example:
```htm... | unknown | unknown | [The problems with HTML classes]
## The problems with HTML classes
More often than not, when representing **UI state in HTML**, we use classes. This often translates into React components or JavaScript code that check a handful of conditions and **add or remove classes** accordingly. Let's look at an example:
```htm... | [The problems with HTML classes]
## The problems with HTML classes
More often than not, when representing **UI state in HTML**, we use classes. This often translates into React components or JavaScript code that check a handful of conditions and **add or remove classes** accordingly. Let's look at an example:
```htm... | code_snippets | ||
8f8e5444-c257-4aa1-b16b-301c5611cf54 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/recommended-minimum-head.md | unknown | 043d19fa-5def-44cd-b286-f3bcc11f3d50 | 0 | SemanticChunker@1.0.0 | 3d5fd534183d219b7873428815328551e5bbad45c9a45b8f31d14ddcc1ef04ed | ---
title: Recommended minimum HTML head
shortTitle: HTML head template
language: html
tags: [metadata,head]
cover: boutique-home-office-1
excerpt: Ensure your HTML documents are properly structured by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-18
---
An essential part of an HTM... | unknown | unknown | ---
title: Recommended minimum HTML head
shortTitle: HTML head template
language: html
tags: [metadata,head]
cover: boutique-home-office-1
excerpt: Ensure your HTML documents are properly structured by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-18
---
An essential part of an HTM... | ---
title: Recommended minimum HTML head
shortTitle: HTML head template
language: html
tags: [metadata,head]
cover: boutique-home-office-1
excerpt: Ensure your HTML documents are properly structured by including these lines in your `<head>` element.
listed: true
dateModified: 2023-01-18
---
An essential part of an HTM... | code_snippets | ||
34ce1881-090f-486d-98b5-78c495d62eab | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/password-autocomplete-suggestion.md | unknown | b70bcbb4-04e8-4927-9b72-d8a04ff4cdfc | 0 | SemanticChunker@1.0.0 | cb223d5a2eae6ac4eebedd1bb38117308017d7e7c9f80e93ba5bf218155c4d26 | ---
title: Add autocomplete to an HTML password field
shortTitle: Password field autocomplete
language: html
tags: [form]
cover: padlocks
excerpt: Use the HTML `autocomplete` attribute to create more secure and accessible password fields.
listed: true
dateModified: 2021-06-12
---
The HTML `autocomplete` attribute prov... | unknown | unknown | ---
title: Add autocomplete to an HTML password field
shortTitle: Password field autocomplete
language: html
tags: [form]
cover: padlocks
excerpt: Use the HTML `autocomplete` attribute to create more secure and accessible password fields.
listed: true
dateModified: 2021-06-12
---
The HTML `autocomplete` attribute prov... | ---
title: Add autocomplete to an HTML password field
shortTitle: Password field autocomplete
language: html
tags: [form]
cover: padlocks
excerpt: Use the HTML `autocomplete` attribute to create more secure and accessible password fields.
listed: true
dateModified: 2021-06-12
---
The HTML `autocomplete` attribute prov... | code_snippets | ||
5c51bb98-7ebd-490d-a3d9-849d892ba380 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/resource-preloading-cheatsheet.md | unknown | 57a51e8d-c351-4755-a42b-6f2e3d6a004f | 0 | SemanticChunker@1.0.0 | 65fb210cf81f8a8fbd0586107dd1788f29c624da6302859f5474bd9390e430ad | ---
title: Resource Preloading Cheat Sheet
language: html
tags: [metadata,cheatsheet]
cover: folded-map
excerpt: Preloading content is one of many ways to improve your website's performance.
listed: true
dateModified: 2022-10-12
---
Preloading content is one of many ways to improve web performance. The `rel` attribute... | unknown | unknown | ---
title: Resource Preloading Cheat Sheet
language: html
tags: [metadata,cheatsheet]
cover: folded-map
excerpt: Preloading content is one of many ways to improve your website's performance.
listed: true
dateModified: 2022-10-12
---
Preloading content is one of many ways to improve web performance. The `rel` attribute... | ---
title: Resource Preloading Cheat Sheet
language: html
tags: [metadata,cheatsheet]
cover: folded-map
excerpt: Preloading content is one of many ways to improve your website's performance.
listed: true
dateModified: 2022-10-12
---
Preloading content is one of many ways to improve web performance. The `rel` attribute... | code_snippets | ||
34e368a0-719c-48bc-8dda-9a6958ef230f | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/prefetching-resources.md | unknown | 2bb8c567-9194-48b2-bc09-833727a861f2 | 1 | SemanticChunker@1.0.0 | 0a8412fcad64dea2f8765413091d016d42a12e56498d208a4bfc138b0c00f5b1 | The only downside to preloading resources compared to prefetching is that [browser support](https://caniuse.com/#search=preload) might be low depending on when you are reading this.
@[Further reading](/html/s/speculation-rules-api-first-look) | unknown | unknown | The only downside to preloading resources compared to prefetching is that [browser support](https://caniuse.com/#search=preload) might be low depending on when you are reading this.
@[Further reading](/html/s/speculation-rules-api-first-look) | The only downside to preloading resources compared to prefetching is that [browser support](https://caniuse.com/#search=preload) might be low depending on when you are reading this.
@[Further reading](/html/s/speculation-rules-api-first-look) | code_snippets | ||
b975d246-1260-431f-bbc7-e06c198edb22 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/prefetching-resources.md | unknown | 2bb8c567-9194-48b2-bc09-833727a861f2 | 0 | SemanticChunker@1.0.0 | a213aa7f526dffc748f52a3aaf127d16e1250855deb7c71500f4404ab1612331 | ---
title: Prefetching resources in the browser
shortTitle: Resource prefetching
language: html
tags: [metadata]
cover: playing-fetch
excerpt: Resource prefetching is a great way to improve perceived page speed on your website and requires little effort. Learn how to use it today.
listed: true
dateModified: 2021-06-12
... | unknown | unknown | ---
title: Prefetching resources in the browser
shortTitle: Resource prefetching
language: html
tags: [metadata]
cover: playing-fetch
excerpt: Resource prefetching is a great way to improve perceived page speed on your website and requires little effort. Learn how to use it today.
listed: true
dateModified: 2021-06-12
... | ---
title: Prefetching resources in the browser
shortTitle: Resource prefetching
language: html
tags: [metadata]
cover: playing-fetch
excerpt: Resource prefetching is a great way to improve perceived page speed on your website and requires little effort. Learn how to use it today.
listed: true
dateModified: 2021-06-12
... | code_snippets | ||
7ba5c8aa-d8f2-4547-b20f-be15c6139691 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/reversed-list.md | unknown | d8a9c504-b9ac-4597-9171-fe060ab396c8 | 0 | SemanticChunker@1.0.0 | 325ecb00e7cc9f7b0ac29c2afe2d9fba34629b45fca5499f2fa23f9c28f40c50 | ---
title: Create a descending list of numbered items in HTML
shortTitle: Descending list
language: html
tags: [content]
cover: ancient-greek-building
excerpt: Did you know there's an easy way to create a descending list of numbered items with pure HTML? Learn how with this handy tip.
listed: true
dateModified: 2021-06... | unknown | unknown | ---
title: Create a descending list of numbered items in HTML
shortTitle: Descending list
language: html
tags: [content]
cover: ancient-greek-building
excerpt: Did you know there's an easy way to create a descending list of numbered items with pure HTML? Learn how with this handy tip.
listed: true
dateModified: 2021-06... | ---
title: Create a descending list of numbered items in HTML
shortTitle: Descending list
language: html
tags: [content]
cover: ancient-greek-building
excerpt: Did you know there's an easy way to create a descending list of numbered items with pure HTML? Learn how with this handy tip.
listed: true
dateModified: 2021-06... | code_snippets | ||
38be6e15-4f9b-466f-bbc7-96686e9d4e09 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/speculation-rules-api-first-look.md | unknown | 576e3fe3-0f3a-4823-9137-b038d19857c9 | 0 | SemanticChunker@1.0.0 | 8bc97602218ba64be1525ce1cb475c787decaa5e8da88820c706f2213b6e61e6 | ---
title: A first look at the Speculation Rules API
shortTitle: Speculation Rules API first look
language: html
tags: [metadata,link,javascript]
cover: orange-coffee-3
excerpt: The new Speculation Rules API aims to deliver across the board performance optimizations with little developer effort. Let's see how!
listed: ... | unknown | unknown | ---
title: A first look at the Speculation Rules API
shortTitle: Speculation Rules API first look
language: html
tags: [metadata,link,javascript]
cover: orange-coffee-3
excerpt: The new Speculation Rules API aims to deliver across the board performance optimizations with little developer effort. Let's see how!
listed: ... | ---
title: A first look at the Speculation Rules API
shortTitle: Speculation Rules API first look
language: html
tags: [metadata,link,javascript]
cover: orange-coffee-3
excerpt: The new Speculation Rules API aims to deliver across the board performance optimizations with little developer effort. Let's see how!
listed: ... | code_snippets | ||
494d8725-8159-4f65-a634-7d3abb43c182 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/speculation-rules-api-first-look.md | unknown | 576e3fe3-0f3a-4823-9137-b038d19857c9 | 3 | SemanticChunker@1.0.0 | 5619d8b1bda4601c6333e757e234141a85cf66703b5444dfd3e7c670a02157e0 | [JSON directives > When prefetching happens]
### When prefetching happens
In broad strokes, **when a user hovers over a link or clicks on it**, the browser can use the Speculation Rules API to determine whether to prefetch the linked resource based on the defined rules. Rules are pretty flexible, allowing you to spec... | unknown | unknown | [JSON directives > When prefetching happens]
### When prefetching happens
In broad strokes, **when a user hovers over a link or clicks on it**, the browser can use the Speculation Rules API to determine whether to prefetch the linked resource based on the defined rules. Rules are pretty flexible, allowing you to spec... | [JSON directives > When prefetching happens]
### When prefetching happens
In broad strokes, **when a user hovers over a link or clicks on it**, the browser can use the Speculation Rules API to determine whether to prefetch the linked resource based on the defined rules. Rules are pretty flexible, allowing you to spec... | code_snippets | ||
647f947b-d23e-4ef6-b764-3bfd7611213e | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/speculation-rules-api-first-look.md | unknown | 576e3fe3-0f3a-4823-9137-b038d19857c9 | 1 | SemanticChunker@1.0.0 | 18784fb7d52dc141ad320ca86182e6f9db082f24e2246bd58a6364503be86236 | [The Speculation Rules API]
## The Speculation Rules API
<baseline-support featureId="speculation-rules">
</baseline-support>
Prefetching individual links, however, is often tedious, even without the hassle of deciding which links needs prefetching. This is where the currently experimental [**Speculation Rules API**... | unknown | unknown | [The Speculation Rules API]
## The Speculation Rules API
<baseline-support featureId="speculation-rules">
</baseline-support>
Prefetching individual links, however, is often tedious, even without the hassle of deciding which links needs prefetching. This is where the currently experimental [**Speculation Rules API**... | [The Speculation Rules API]
## The Speculation Rules API
<baseline-support featureId="speculation-rules">
</baseline-support>
Prefetching individual links, however, is often tedious, even without the hassle of deciding which links needs prefetching. This is where the currently experimental [**Speculation Rules API**... | code_snippets | ||
8ad243bb-c036-4988-9efa-5803f71f3e91 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/speculation-rules-api-first-look.md | unknown | 576e3fe3-0f3a-4823-9137-b038d19857c9 | 2 | SemanticChunker@1.0.0 | c6e9bd1b2cd5496d39c6603c6a6a6c4e12acf868b1d016d3a2124fb0ce45f5d3 | [The Speculation Rules API > JSON directives]
### JSON directives
The Speculation Rules API consists of a simple JavaScript `<script>` tag with the `type="speculationrules"` attribute. Inside this tag, you can define your prefetching rules using a **JSON object**.
```html
<!-- Prefetch all local pages -->
<script ty... | unknown | unknown | [The Speculation Rules API > JSON directives]
### JSON directives
The Speculation Rules API consists of a simple JavaScript `<script>` tag with the `type="speculationrules"` attribute. Inside this tag, you can define your prefetching rules using a **JSON object**.
```html
<!-- Prefetch all local pages -->
<script ty... | [The Speculation Rules API > JSON directives]
### JSON directives
The Speculation Rules API consists of a simple JavaScript `<script>` tag with the `type="speculationrules"` attribute. Inside this tag, you can define your prefetching rules using a **JSON object**.
```html
<!-- Prefetch all local pages -->
<script ty... | code_snippets | ||
982b6522-246e-4970-bb9c-8ef5a7b06b98 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/speculation-rules-api-first-look.md | unknown | 576e3fe3-0f3a-4823-9137-b038d19857c9 | 5 | SemanticChunker@1.0.0 | debef43ceba6cb020b31f37be1156571f432fcdef0ad0272f2c9aa7a0f97b206 | [JSON directives > Prerendering]
### Prerendering
On a side note, you can also **prerender pages**. Prerendering is a more aggressive form of prefetching that not only fetches the resources for a page but also renders it in the background. This means that when the user eventually navigates to the prerendered page, it... | unknown | unknown | [JSON directives > Prerendering]
### Prerendering
On a side note, you can also **prerender pages**. Prerendering is a more aggressive form of prefetching that not only fetches the resources for a page but also renders it in the background. This means that when the user eventually navigates to the prerendered page, it... | [JSON directives > Prerendering]
### Prerendering
On a side note, you can also **prerender pages**. Prerendering is a more aggressive form of prefetching that not only fetches the resources for a page but also renders it in the background. This means that when the user eventually navigates to the prerendered page, it... | code_snippets | ||
bedc5485-be4b-42ef-82e4-33696887b12e | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/speculation-rules-api-first-look.md | unknown | 576e3fe3-0f3a-4823-9137-b038d19857c9 | 4 | SemanticChunker@1.0.0 | 1e683bea850637a96b8f0cf622f6b65c1aac5a0482ed685bc8c03883ee9dee6b | [JSON directives > Rules and patterns]
### Rules and patterns
<baseline-support featureId="urlpattern">
</baseline-support>
As we've already seen, you can use the [URL Pattern API](https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API) to match **specific URL patterns** in your speculation rules. This API... | unknown | unknown | [JSON directives > Rules and patterns]
### Rules and patterns
<baseline-support featureId="urlpattern">
</baseline-support>
As we've already seen, you can use the [URL Pattern API](https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API) to match **specific URL patterns** in your speculation rules. This API... | [JSON directives > Rules and patterns]
### Rules and patterns
<baseline-support featureId="urlpattern">
</baseline-support>
As we've already seen, you can use the [URL Pattern API](https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API) to match **specific URL patterns** in your speculation rules. This API... | code_snippets | ||
d3023a47-52ab-43ae-90cb-16c6b310d66a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/speculation-rules-api-first-look.md | unknown | 576e3fe3-0f3a-4823-9137-b038d19857c9 | 6 | SemanticChunker@1.0.0 | 82b241cfc2d63a0b8ef05cb88de84a1978fcaf0be0c3f2ecb8b92761f17abb24 | [JSON directives > Considerations]
### Considerations
As usual with **prefetching**, it's important to remember that it isn't in itself free, but rather an optimization that can be beneficial when used judiciously. Overusing prefetching can lead to **increased resource consumption**, as any resource prefetch requires... | unknown | unknown | [JSON directives > Considerations]
### Considerations
As usual with **prefetching**, it's important to remember that it isn't in itself free, but rather an optimization that can be beneficial when used judiciously. Overusing prefetching can lead to **increased resource consumption**, as any resource prefetch requires... | [JSON directives > Considerations]
### Considerations
As usual with **prefetching**, it's important to remember that it isn't in itself free, but rather an optimization that can be beneficial when used judiciously. Overusing prefetching can lead to **increased resource consumption**, as any resource prefetch requires... | code_snippets | ||
ef833806-e2a4-4ae5-bbfe-19a4dc70abf4 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/speculation-rules-api-first-look.md | unknown | 576e3fe3-0f3a-4823-9137-b038d19857c9 | 7 | SemanticChunker@1.0.0 | fcf2b557bbda5d2828a6affc825a034a8355e09807835d74d20c016ff73e3375 | [The Speculation Rules API > Conclusion]
## Conclusion
The Speculation Rules API is a very **powerful tool**, when used in the correct way. It can remove the hassle of manual prefetching and prerendering, allowing developers to define clear rules for when and how resources should be loaded, adapting to **user behavio... | unknown | unknown | [The Speculation Rules API > Conclusion]
## Conclusion
The Speculation Rules API is a very **powerful tool**, when used in the correct way. It can remove the hassle of manual prefetching and prerendering, allowing developers to define clear rules for when and how resources should be loaded, adapting to **user behavio... | [The Speculation Rules API > Conclusion]
## Conclusion
The Speculation Rules API is a very **powerful tool**, when used in the correct way. It can remove the hassle of manual prefetching and prerendering, allowing developers to define clear rules for when and how resources should be loaded, adapting to **user behavio... | code_snippets | ||
5b057d04-c4b9-424d-a71c-10fe96402afb | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/open-all-links-in-new-tab.md | unknown | a47233a5-3c33-450b-8f63-929190bb6789 | 0 | SemanticChunker@1.0.0 | 197103dcb84e2bfadb3e5c273127015689cb7d725b21b776b3566a92812bd501 | ---
title: Open all links in an HTML document in a new tab
shortTitle: Open all links in a new tab
language: html
tags: [link]
cover: paper-card
excerpt: Using an HTML element, you can easily make all links in your document open in a new tab. Learn how with this quick tip.
listed: true
dateModified: 2024-03-16
---
One... | unknown | unknown | ---
title: Open all links in an HTML document in a new tab
shortTitle: Open all links in a new tab
language: html
tags: [link]
cover: paper-card
excerpt: Using an HTML element, you can easily make all links in your document open in a new tab. Learn how with this quick tip.
listed: true
dateModified: 2024-03-16
---
One... | ---
title: Open all links in an HTML document in a new tab
shortTitle: Open all links in a new tab
language: html
tags: [link]
cover: paper-card
excerpt: Using an HTML element, you can easily make all links in your document open in a new tab. Learn how with this quick tip.
listed: true
dateModified: 2024-03-16
---
One... | code_snippets | ||
3a4483bb-10f3-4fc0-8679-bb99d74a3410 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/number-only-input.md | unknown | b45189b7-08b4-41ee-b724-17a4c902100e | 0 | SemanticChunker@1.0.0 | 30bae7e0f9d669568791d4990d60dc5e3f13884dd250b09f3b21fd76a75f0813 | ---
title: A user-friendly setup for number-only inputs with plain HTML
shortTitle: Number-only input
language: html
tags: [form]
cover: palm-sun
excerpt: Number-only inputs aren't as straightforward as you might expect. Here's a user-friendly way to set them up.
listed: true
dateModified: 2024-01-04
---
Number-only i... | unknown | unknown | ---
title: A user-friendly setup for number-only inputs with plain HTML
shortTitle: Number-only input
language: html
tags: [form]
cover: palm-sun
excerpt: Number-only inputs aren't as straightforward as you might expect. Here's a user-friendly way to set them up.
listed: true
dateModified: 2024-01-04
---
Number-only i... | ---
title: A user-friendly setup for number-only inputs with plain HTML
shortTitle: Number-only input
language: html
tags: [form]
cover: palm-sun
excerpt: Number-only inputs aren't as straightforward as you might expect. Here's a user-friendly way to set them up.
listed: true
dateModified: 2024-01-04
---
Number-only i... | code_snippets | ||
fa122ae6-3d0e-484e-87a8-85c29fafa096 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/html/s/lazy-loading-images.md | unknown | 2380ae44-fcb6-486f-afec-2f90787c962c | 0 | SemanticChunker@1.0.0 | 9fc07899a177842a1d43f7f1135c95a79c01c10334ce731860352ef9fe111c89 | ---
title: Lazy load images in HTML
shortTitle: Image lazy loading
language: html
tags: [image]
cover: bridge
excerpt: Discover how to improve your website's performance by implementing lazy loading for images using a native HTML attribute.
listed: true
dateModified: 2021-06-12
---
In today's digital landscape, images... | unknown | unknown | ---
title: Lazy load images in HTML
shortTitle: Image lazy loading
language: html
tags: [image]
cover: bridge
excerpt: Discover how to improve your website's performance by implementing lazy loading for images using a native HTML attribute.
listed: true
dateModified: 2021-06-12
---
In today's digital landscape, images... | ---
title: Lazy load images in HTML
shortTitle: Image lazy loading
language: html
tags: [image]
cover: bridge
excerpt: Discover how to improve your website's performance by implementing lazy loading for images using a native HTML attribute.
listed: true
dateModified: 2021-06-12
---
In today's digital landscape, images... | code_snippets |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.