WordPress.org

Ready to get started?Download WordPress

Forums

commented out descriptions appear as the real thing ? (5 posts)

  1. astoller
    Member
    Posted 7 years ago #

    Hi

    Can you explain why the 1st tag below appears as the actual page description even though it is surrounded by comment tags.The 2nd tag I wanted to be the actual description, but it does not appear that way on the browsed page.
    Thanks
    Arthur

    <!--<meta name="description" content="Party costumes: Hen parties, stag nights and all outfit for all events" />

    <meta name="description" content="Games for Hen parties and stag nights"/>

  2. moshu
    Member
    Posted 7 years ago #

    even though it is surrounded by comment tag...

    Well, actually, it is not surrounded.
    It has only the opening tag and missing the closing tag: -->

    It should be:
    <!--<meta name="description" content="Party costumes: Hen parties, stag nights and all outfit for all events" />-->

  3. astoller
    Member
    Posted 7 years ago #

    So as it stands, is the tag then considered to be a real description tag?

  4. moshu
    Member
    Posted 7 years ago #

    You don't read carefully!
    You did NOT comment it out. Period. You thought so, but you didn't.

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    So as it stands, is the tag then considered to be a real description tag?

    As it stands, with half of a comment, the entire page is invalid and you're lucky it displays at all.

    Invalid page code has undefined behavior. It's not considered to be a real anything unless it's valid in the first place.

Topic Closed

This topic has been closed to new replies.

About this Topic