[HTML 5] Show tags in string?

Discussion in 'HTML & Website Design' started by nickjason, Feb 7, 2010.

  1. #1
    I am having a slight problem. I want to include the tag in my string of letters, to be printed out to the user, but it keeps putting the tags into format. Example:

    the <h1> tag will create a "header" size "1" tag.
    Code (markup):
    Which validates the rest of the code as style: <h1>

    So how can I show my readers what tag i'm using, without initializing that tag?
     
    nickjason, Feb 7, 2010 IP
  2. subdivisions

    subdivisions Well-Known Member

    Messages:
    1,021
    Likes Received:
    40
    Best Answers:
    1
    Trophy Points:
    145
    #2
    &lt; will make a "<" sign

    &gt; will make a ">" sign.
     
    subdivisions, Feb 7, 2010 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can also wrap subdivision's solution in <code> tags to make it more meaningful.

    <p>the <code>&lt;h1&gt;</code> tag will create a "header" size "1" tag.</p>

    code {
    font-family: courier, "courier new", monotype;
    }

    BTW the important thing about h1's isn't the size that's created but the meaning: h1 tags create a level-1 header, meaning the most important header of the page. Usually the same as the title of the document.
     
    Stomme poes, Feb 8, 2010 IP