Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!


Sponsored Content

 

 
 

Photo
- - - - -

Alt And Title Attributes


  • Please log in to reply
79 replies to this topic

#76 CTPhil

CTPhil

    HR 3

  • Active Members
  • PipPipPip
  • 92 posts
  • Location:NW Connecticut, USA

Posted 15 September 2006 - 10:46 AM

QUOTE(qwerty @ Sep 15 2006, 10:55 AM)
Any tag can contain attributes, as far as I know. Think of it this way: the tag is identified by the first unbroken string of characters after the opening <, so anything that starts <a is an anchor tag, and anything that starts <title is a title tag. After that, before the tag is closed, you get attributes, and they're always in the format of x="y".

So, in
CODE
<a href="http://www.highrankings.com/" target="_blank" rel="nofollow" style="text-decoration:none;">
you've got an anchor containing four attributes.
View Post

I think I finally got it! Thanks to all who contributed.

#77 torka

torka

    Vintage Babe

  • Moderator
  • 4,392 posts
  • Location:Triangle area, NC, USA, Earth (usually)

Posted 15 September 2006 - 10:54 AM

QUOTE(Sarah)
I've nearly got it through my head

Not quite, at least I don't think so...

TAGS:
CODE
<a> or <title> or <img> or <b>
Just the bits between the angle brackets that start everything off.

ATTRIBUTES:
CODE
href="something.html" or style="somestyle;" or alt="some text here" or src="image.jpg"
These are things that modify the tag. They're written inside the angle brackets of the tag.

ELEMENTS:
CODE
<title>Page Title</title>
<a href="link.html">Anchor Text</a>
<img src="image.jpg" border="0" />
Tags, attributes, text and all the other bits that make these suckers actually do something on the page. In plain HTML, not all elements need to be closed (such as the "img" tag/element, which can stand on it's own). In XHTML, every element needs to be closed, thus the addition of the " /" (space and slash) at the end of the IMG tag (which makes it an IMG element, I think? wacko.gif).

Personally, I've never really cared as much about the distinction between an element and a tag as I have about the distinction between a tag and an attribute. Since there is at least one tag that shares a name with an attribute (the infamous "title"), leading to much confusion when the two are mixed up, I try to make it a point to use the word attribute correctly in context.

I generally use "tag" and "element" interchangeably, even though I suppose that's not technically correct, because the potential for confusion and the consequences thereof is much less, at least in most normal forum conversations.

Present conversation excepted, of course. giggle.gif

CTPhil, I think you've got it! smile.gif

--Torka mf_prop.gif

#78 Sarah

Sarah

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 391 posts
  • Location:Kent

Posted 15 September 2006 - 11:05 AM

Torka,

If you were here in my office, I would be dragging you to my friends pub for a Flirty Gertie* bubbly.gif to thank you for clearing me up, putting me straight and getting me through the day on this one. flowers.gif

It's like you're the Betty Ford for confused little ones like myself.

*named after a barmaid who had the ability to wheedle drinks out of the tightest of wallets

#79 Clintorius

Clintorius

    HR 4

  • Active Members
  • PipPipPipPip
  • 210 posts

Posted 18 September 2006 - 11:17 AM

QUOTE(Sarah @ Sep 15 2006, 11:24 AM)
I've nearly got it through my head:
<title> </title> tag
<title> ELEMENT </title> page title
<tag alt="ATTRIBUTE">ELEMENT</tag>tag, page title, with attribute


Not quite, sorry! nah.gif

<title> </title> tag Yes, there is a open tag and a close tag

<title> ELEMENT </title> page title should be:
<title> page title</title> ELEMENT

<tag alt="ATTRIBUTE">ELEMENT</tag>tag, page title, with attribute should be:

<tag alt="ATTRIBUTE">ELEMENT-TEXT</tag>tag with attribute, page title, closing tag

Clintorius

#80 Clintorius

Clintorius

    HR 4

  • Active Members
  • PipPipPipPip
  • 210 posts

Posted 18 September 2006 - 11:20 AM

In the HTML DOcument Object Model a HTML element span both the tags and the element text.

An anchor element = tag with attributes + anker text + closing tag.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users