SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: Calling Name

  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,207
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Calling Name

    Code:
    <font color='red'>Red Text</font>
    color : attribute
    red : value

    Then, how do you call font?

    Selector, element, tag or something?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,426
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    font tag

    If you are having problems working with the font tag, it may be because it's a deprecated element.

  3. #3
    Texan at Heart Corey Bryant's Avatar
    Join Date
    Sep 2003
    Location
    Castle Rock, CO
    Posts
    2,491
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <font> tag but you should use styles to set the font.

  4. #4
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,207
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    If you are having problems working with the font tag, it may be because it's a deprecated element.
    Thank you for your quick reply.

    I just want to know the calling name of font.

    I like to ask like the following.

    Code:
    <table border='1'>
    border : attribute
    1 : value

    Then how do you call table, compared to attribute and value?

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,426
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    tag == element

    AFAIK tag and element are synonymous. eg. getElementsByTagName('table')
    The difference is that in an HTML file you might call the table element a table tag and it would be OK, but XML files don't have tags per se. HTML is XML, but not all XML is HTML.

  6. #6
    Texan at Heart Corey Bryant's Avatar
    Join Date
    Sep 2003
    Location
    Castle Rock, CO
    Posts
    2,491
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can create a class for each table / td tag if needed
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled 1</title>
    <style type="text/css">
    td.testing
    {
    	font-family:Arial, Helvetica, sans-serif;
    	color:red;
    }
    </style>
    </head>
    
    <body>
    
    <table style="width: 100%">
    	<tr>
    		<td class="testing">testing</td>
    	</tr>
    </table>
    
    </body>
    
    </html>
    Or use inline styles
    Code:
    <td style="font-family:Arial, Helvetica, sans-serif;color:red;">testing</td>
    and of course you can shorthand styles as well.

  7. #7
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "font" is the element name. The whole shebang is the element. "<font color='red'>" and "</font>" are tags.

    All sorts of things are often incorrectly referred to as "tags".
    Simon Pieters

  8. #8
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <font color="red">Foo</font> is an element.
    <font color="red"> is a start tag.
    font is the element type (or element name).
    color="red" is an attribute.
    color is an attribute name.
    red is an attribute value.
    </font> is an end tag.

    For the picky:
    < is a STAGO separator (start-tag open).
    </ is an ETAGO separator (end-tag open).
    > is a TAGC separator (tag close).
    Birnam wood is come to Dunsinane

  9. #9
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,426
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    for the record

    *Update*
    It seems that I'm always learning something new. (not that it's always important stuff, my mind holds lots of useless trivia )
    But as pointed out by AutisticCuckoo, elements are comprised of tags, even in XML files. So my earlier statement
    Quote Originally Posted by Mittineague
    but XML files don't have tags per se
    is wrong.
    Off Topic:

    Whew! With that confession out of the way I now have one less New Year's resolution to worry about.
    Just a thought, if &#91;B] is a bbcode tag, is &#91;B]bold text&#91;/B] a bbcode element?

  10. #10
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For completeness...

    Foo is the element's content.
    Simon Pieters

  11. #11
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right ... if we're going to be complete...

    = is a VI separator (value indicator)
    " is a LIT separator (literal tag start or end)

    Those who prefer single quotes use LITA separators: literal tag start or end (alternate).

    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •