Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Meta Tag Compliance Checker | On-Page and Technical SEO Analysis with Python
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for SEO Specialists

bookChallenge: Meta Tag Compliance Checker

Ensuring meta tags meet SEO guidelines is a common audit step for SEO specialists. You often need to verify that the meta title and meta description of a page fall within recommended character limits to maximize visibility and click-through rates. Automating this process with Python can save time and reduce manual errors.

Завдання

Swipe to start coding

Your task is to implement a function that checks if the meta title and meta description in a given HTML string meet standard SEO character length guidelines.

  • Extract the content of the <title> tag from the html string.
  • Extract the content of the <meta name="description" content="..."> tag from the html string.
  • Determine if the title length is between 30 and 60 characters, inclusive.
  • Determine if the description length is between 70 and 160 characters, inclusive.
  • Return a dictionary with the keys "title" and "description", where each value is a dictionary containing the keys "length" and "compliant" indicating the character count and compliance status.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 3
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you show me how to automate checking meta tag lengths with Python?

What are the recommended character limits for meta titles and descriptions?

Why is it important to follow these character limits for SEO?

close

bookChallenge: Meta Tag Compliance Checker

Свайпніть щоб показати меню

Ensuring meta tags meet SEO guidelines is a common audit step for SEO specialists. You often need to verify that the meta title and meta description of a page fall within recommended character limits to maximize visibility and click-through rates. Automating this process with Python can save time and reduce manual errors.

Завдання

Swipe to start coding

Your task is to implement a function that checks if the meta title and meta description in a given HTML string meet standard SEO character length guidelines.

  • Extract the content of the <title> tag from the html string.
  • Extract the content of the <meta name="description" content="..."> tag from the html string.
  • Determine if the title length is between 30 and 60 characters, inclusive.
  • Determine if the description length is between 70 and 160 characters, inclusive.
  • Return a dictionary with the keys "title" and "description", where each value is a dictionary containing the keys "length" and "compliant" indicating the character count and compliance status.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 3
single

single

some-alt