The Basics of (X)HTML Tags

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites & 1 Group

    The Basics of (X)HTML Tags - Presentation Transcript

    1. The Basics of (X)HTML Tags Background photo by Will Pate
        • LearningNerd.com
        • LearningNerd.com
        • This is part of a series of (X)HTML and CSS tutorials, which can all be found at LearningNerd.com/xhtml-css
    2. Anatomy of an (X)HTML Tag
        • An (X)HTML tag is just a name/keyword surrounded by angle brackets.
        • So this is called the h1 tag .
        • Tag name
        • Angle brackets
        • < h1 >
        • It's good practice to write all HTML tags in lower-case letters.
        • And when using XHTML, all tags must be lower-case.
        • Good: <html>
        • Bad: <HTML>
        • Most (X)HTML tags are used in pairs to label content (such as text).
        • The closing tag always needs a slash before the tag name.
        • Opening tag
        • Closing Tag
        • <h1> content < / h1>
        • The opening tag, closing tag, and the content between them makes one unit called an (X)HTML element.
        • More specifically, this example can be called the h1 element .
        • <h1> content </h1>
        • (X)HTML Element
        • Just like those Russian stacking dolls, (X)HTML elements can nest inside of each other.
        • <p> here's a bunch of text with <q> a quote </q> in the middle of it </p>
      Photo by A30_Tsitika / Angélica
        • When nesting elements, the first tag opened must be the last tag closed.
        • Good:
        • <p> <q></q> </p>
        • Bad:
        • <p> <q> </p> </q>
        • Some (X)HTML tags insert content instead of labeling it. They're called empty or self-closing tags.
        • <hr>
        • In HTML, empty tags just look like opening tags.
        • <hr / >
        • In XHTML, empty tags have a slash .
        • (The space before the slash makes it compatible with old web browsers.)
    3. Attributes
        • Attributes just add extra information within an (X)HTML tag.
        • The value for an attribute can be inside either single or double quotes.
        • <h1 id =“ blah ”>
        • Attribute
        • Value
        • Tags can have multiple attributes, each separated by a space .
        • <h1 id=“blah” class=“big” >
        • content </h1>
        • Attributes always go inside the opening tag.
        • You'll learn how to use every specific attribute and tag later in this series.
        • Now that you know the basic rules for writing (X)HTML, the rest will be easy!
        • The next part of this series will cover the elements of an (X)HTML document.
        • If you have any questions, feel free to contact me through LearningNerd.com .

    + LearningNerdLearningNerd, 2 years ago

    custom

    2257 views, 4 favs, 6 embeds more stats

    A quick overview of how to write (X)HTML. This just more

    More info about this document

    CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

    Go to text version

    • Total Views 2257
      • 1965 on SlideShare
      • 292 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 245
    Most viewed embeds
    • 267 views on http://www.learningnerd.com
    • 12 views on http://informaticagitok.wordpress.com
    • 6 views on http://moodle.otagogirls.school.nz
    • 5 views on http://www.createwebsite.info
    • 1 views on http://feeds.feedburner.com

    more

    All embeds
    • 267 views on http://www.learningnerd.com
    • 12 views on http://informaticagitok.wordpress.com
    • 6 views on http://moodle.otagogirls.school.nz
    • 5 views on http://www.createwebsite.info
    • 1 views on http://feeds.feedburner.com
    • 1 views on http://209.85.135.132

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events