HTML code for a blog post with meta tags

Here's an example HTML code for a blog post with meta tags:


<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Blog Post Title</title> <meta name="description" content="Brief summary of the blog post"> <meta name="keywords" content="Main keywords and related phrases"> <meta name="robots" content="index,follow"> <link rel="canonical" href="https://www.example.com/blog-post"> <meta property="og:title" content="Blog Post Title"> <meta property="og:description" content="Brief summary of the blog post"> <meta property="og:image" content="https://www.example.com/images/blog-post.jpg"> <meta property="og:url" content="https://www.example.com/blog-post"> <meta property="og:type" content="article"> </head> <body> <!-- Blog post content goes here --> </body> </html>

In this code, the head section contains several meta tags:title: Specifies the title of the blog post.
description: Provides a brief summary of the blog post.
keywords: Lists the main keywords and related phrases.
robots: Tells search engine bots to index and follow the page.
canonical: Indicates the preferred version of the webpage to search engines.
og:title: Sets the title of the blog post when shared on social media platforms.
og:description: Provides a brief summary of the blog post when shared on social media platforms.
og:image: Specifies the image that should be displayed when the blog post is shared on social media platforms.
og:url: Sets the URL of the blog post when shared on social media platforms.
og:type: Indicates that the content is an article.

By using these meta tags in your blog posts, you can help search engines understand the content and improve the chances of your blog posts appearing in search results.



php
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>How to Bake the Perfect Cake</title> <meta name="description" content="Learn how to bake a delicious cake with this step-by-step guide."> <meta name="keywords" content="baking, cake, recipe, dessert, kitchen"> <meta name="robots" content="index,follow"> <link rel="canonical" href="https://www.example.com/bake-perfect-cake"> <meta property="og:title" content="How to Bake the Perfect Cake"> <meta property="og:description" content="Learn how to bake a delicious cake with this step-by-step guide."> <meta property="og:image" content="https://www.example.com/images/cake.jpg"> <meta property="og:url" content="https://www.example.com/bake-perfect-cake"> <meta property="og:type" content="article"> </head> <body> <header> <h1>How to Bake the Perfect Cake</h1> <p>By Jane Doe</p> </header> <main> <section> <h2>Ingredients</h2> <ul> <li>2 cups all-purpose flour</li> <li>1 1/2 cups granulated sugar</li> <li>1 teaspoon baking powder</li> <li>1/2 teaspoon baking soda</li> <li>1/2 teaspoon salt</li> <li>1/2 cup unsalted butter, softened</li> <li>2 large eggs</li> <li>1 cup buttermilk</li> <li>1 teaspoon vanilla extract</li> </ul> </section> <section> <h2>Instructions</h2> <ol> <li>Preheat the oven to 350°F. Grease and flour a 9-inch cake pan.</li> <li>In a medium bowl, combine the flour, sugar, baking powder, baking soda, and salt.</li> <li>In a large bowl, cream the butter until light and fluffy. Add the eggs one at a time, beating well after each addition.</li> <li>Gradually add the dry ingredients to the butter mixture, alternating with the buttermilk and vanilla extract. Mix until just combined.</li> <li>Pour the batter into the prepared pan and smooth the top with a spatula.</li> <li>Bake for 30-35 minutes, or until a toothpick inserted into the center of the cake comes out clean.</li> <li>Let the cake cool in the pan for 10 minutes, then remove from the pan and transfer to a wire rack to cool completely.</li> </ol> </section> <section> <h2>Conclusion</h2> <p>Congratulations! You've just learned how to bake the perfect cake. This recipe is a great starting point for experimenting with different flavors and toppings. Happy baking!</p> </section> </main> <footer> <p>Copyright © 2023 Jane Doe</p> </footer> </body> </html>
In this example, the blog post is titled "How to Bake the Perfect Cake" and includes meta tags for
Next Post Previous Post