Hướng dẫn thử thách
1 / 2
What Is the Role of the Meta Description, and How Does It Affect SEO?
SEO, or Search Engine Optimization, is a practice that optimizes web pages so they become more visible and rank higher on search engines. One way to improve your site's SEO is to provide a short description for the web page using the `meta` element. Here is an example of using the meta element to set a page description for a gardening site:
```html
<meta
name="description"
content="Discover expert tips and techniques for gardening in small spaces, choosing the right plants, and maintaining a thriving garden."
/>
```
Setting the `name` attribute to `description` ensures that browsers, search engines, and other web tools correctly interpret this metadata. The `content` attribute is where you will place your description. It is recommended that you keep your descriptions short and concise. This is because search engines will often truncate the description based on the results page layout.
Similar to other types of `meta` elements, the `meta` description will not be visible on the web page itself. One place where the page description can be found is in the search engine results page snippet. Here are some examples of page result snippets for freeCodeCamp's subreddit and GitHub repositories:
```md
r/freeCodeCamp: This is the official subreddit for the freeCodeCamp.org community. Learn to
code for free together with millions of other people...
```
```md
Our full-stack web development and machine learning curriculum is completely free and self-
paced. We have thousands of interactive coding challenges to help you...
```
In the examples, each of the page descriptions is located just beneath the site links. Within a couple of seconds, users can get a general sense of what the page is about and decide to click on the links for more information.
Even though `meta` descriptions won't directly affect a site's ranking on search engines, having a strong description could result in more traffic to your website.
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.sh
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵