18: HTML links - let's build a web!

Forums » Dev.Opera » Archived Article Discussions

This topic has been closed. No new entries allowed.

Reason: You can now post comments on articles on Dev Opera

Forum rules and guidelines

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

8. July 2008, 07:15:38

ChrisHeilmann

Posts: 2

18: HTML links - let's build a web!

Some may argue that links are the most important feature of the Web - they make it a Web after all, linking all the pages together. In this article, Christian Heilmann takes you on a detailed tour of using the <a> element to create accessible, meaningful links.

( Read the article )

8. July 2008, 17:58:37

Moderator

Tamil

:-(|)

Posts: 115311

Visitors cannot bookmark the page—the next time they open their bookmark they̱ll get the initial state of the frameset and not the page as they left it.

9. July 2008, 08:28:07

Opera Software

chrismills

Posts: 379

@Tamil - cheers, fixed!
Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

13. July 2008, 08:24:56

josdehart

Banned user

A bit confused here: do you recommend using the id or the name for anchors? You seem to have corrected your text but which of the two is correct?

16. July 2008, 11:07:17

Opera Software

chrismills

Posts: 379

Originally posted by josdehart:

A bit confused here: do you recommend using the id or the name for anchors? You seem to have corrected your text but which of the two is correct?



ID is correct.
Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

16. July 2008, 16:01:21

Ton-Lankveld

Posts: 3

One other type of link you can find on websites, is the mailto-link. Many times it is disguised as a "contact" or "info" link. When a visitor clicks on it, the email program jumps in his face. Annoying at least. Especially when the "contact" link is part of the main menu.
It happens, I've seen it!

Good examples of mailto-links are "info@example.com" or "send me an email".

My 2 (Euro)cents.
History repeats itself.
It has to,
nobody is listening.

24. November 2008, 15:00:25

marcotuts

Posts: 1

The print for me doesn't work right. It ignores the equivalent of the first page. I've printed many opera articles, and from the WSC Curriculum articles 18,19, and a handful in the 20s don't print right for me....

25. November 2008, 07:45:53

Opera Software

chrismills

Posts: 379

Originally posted by marcotuts:

The print for me doesn't work right. It ignores the equivalent of the first page. I've printed many opera articles, and from the WSC Curriculum articles 18,19, and a handful in the 20s don't print right for me....



Thanks for the heads up. I will have to look into this for you.

As an FYI - one thing we are doing as soon as the final articles are published is to create accessible, nice PDFs of the articles for easy printing.
Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

19. December 2008, 18:19:09

karaj

Opera fan

Posts: 1085

In the list at the end of chapter "Link or target?" there is a misstype: "ref" instead of "href".

19. December 2008, 23:23:37

stelt

Posts: 59

<whisper>You can make framesets bookmarkable, but as it involves a fragile javascript hack, i fully agree and say:</whisper> "Please no frames".

13. January 2009, 08:48:57

AndBre

Posts: 25

As the article recommends the "id" attribute:
1. "Link or target? The name and href attributes" should be "Link or target? The id and href attributes"
2. "A fragment identifier or anchor name" should be "A fragment identifier or id name"
3. "(with a name attribute)" should be "(with an id attribute)"
4. "The need for an anchor name to be unique" should be "The need for an anchor id to be unique"

3. April 2009, 19:04:10

Erinyes

the Reasoner.

Posts: 378

Frames and popups—just say no


As with previous articles, this is personal bias. There are good uses for them, the article should not presume the user is a idiot or otherwise have such narrow minded target audience. Frames/Popus having been missued in the distant past is no excuse to discard/ignore/vandalise them.
Just as I thought...

6. April 2009, 21:46:30

Opera Software

chrismills

Posts: 379

Originally posted by Erinyes:

As with previous articles, this is personal bias. There are good uses for them, the article should not presume the user is a idiot or otherwise have such narrow minded target audience. Frames/Popus having been missued in the distant past is no excuse to discard/ignore/vandalise them.



Thanks for your comment Erinyes. I'll get on to answering all your comments tonight.

Well, you can look at this as personal bias, but it is more a bias of the whole course, and it is a generally agreed best practice that use of frames and popups are bad, for usability and acessibility.

Complicated web applications sometimes make use of trickery like hidden iFRames and suchlike, but this is not generally agreed best practice. I'd be interested to hear your further thoughts on this, and what you consider good uses for Frames and popups.

Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

18. June 2009, 23:48:52 (edited)

accelerator

Posts: 3

This is a great course and I'm learning a lot. Thanks for taking the time to research, write and support.

The articles inspired me to run my website through the W3C link checker (amongst doing other good things).

My question is "are broken URI fragments a problem?" The normal operation of the site doesn't seem to be affected although I'm wondering if google page rank is affected (my site is writen SEF and yet seems stuck at PR2 even though alexa is rising nicely though 650K now).

As I understand it, the google spider would follow these links and find only styling fragments but no content. Therefore the ranking engine would never get to see the keyword rich content.

Here is the W3C linkchecker report detail:

(The only box I ticked was the "check linked documents recursively" and I set this to ten levels.)

W3C linkchecker returned the following report

200 1 Some of the links to this resource point to broken URI fragments (such as index.html#fragment).

error Lines: 74, 75, 76, 77, 157, 290, 291, 292, 293, 294, 295, 297, 299, 308, 315, 326, 337, 348, 357, 367, 376, 386, 396, 406, 417, 427, 436, 446, 456 http://www.my-own-site.com/
Status: 200 OK

Some of the links to this resource point to broken URI fragments (such as index.html#fragment).
Broken fragments:

* http://www.my-own-site.com/#ja-content (line 74)
* http://www.my-own-site.com/#ja-col1 (line 76)
* http://www.my-own-site.com/#ja-mainnav (line 75)
* http://www.my-own-site.com/#ja-col2 (line 77)



Any comments appreciated
Thinking about making your first skydive?
step into my office - 14k feet of sky
http://www.acceleratedfreefall.com

23. June 2009, 12:28:17

Opera Software

chrismills

Posts: 379

Originally posted by accelerator:

My question is "are broken URI fragments a problem?"



Hi there - thanks for the nice comments!

So basically, you have a site containing some links to specific anchors on a page, but those ids don't actually exist on the page, so the links are broken?

It's not exactly a critical problem, ie it won't totally break the functionality of your site, but it is rather untidy, likely to affect SEO, and will irritate your users and make them less likely to trust your content. So you really should fix them.

Why do you ask?

best regards,
Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

24. June 2009, 11:59:08

reisenderpro

Posts: 2

Thanks for this very extensive article about links, but I´m misssing something about the rel attribut.

26. June 2009, 08:14:16

accelerator

Posts: 3

Thanks for the sanity check re the URI fragments Chris, one of my objectives in working through this course is to build up my own capability to fix them smile The question was to ensure that I really did have a problem in the first place.

I'm hoping by the time I complete HTML and CSS sections, that I'll have the knowledge to fix it.

Thinking about making your first skydive?
step into my office - 14k feet of sky
http://www.acceleratedfreefall.com

29. June 2009, 17:50:13

Opera Software

chrismills

Posts: 379

Originally posted by accelerator:

Thanks for the sanity check re the URI fragments Chris, one of my objectives in working through this course is to build up my own capability to fix them The question was to ensure that I really did have a problem in the first place.



Ok, I getcha. Glad I could be of help.
Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

29. June 2009, 17:52:19

Opera Software

chrismills

Posts: 379

Originally posted by reisenderpro:

Thanks for this very extensive article about links, but I´m missing something about the rel attribut.



This might be answered in the follow-up article, at http://dev.opera.com/articles/view/supplementary-more-about-the-document/. Let me know if this helps.

Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

21. October 2011, 15:50:03

maritane

Posts: 1

Thanks for a great series of lessons.

I found another name/ID error in the summary of the article.

22. October 2011, 06:32:45

omirinde

Posts: 1

Originally posted by karaj:

In the list at the end of chapter "Link or target?" there is a misstype: "ref" instead of "href".

Ref is correct one

24. October 2011, 09:52:52

Opera Software

chrismills

Posts: 379

Originally posted by maritane:

I found another name/ID error in the summary of the article.



Where was the error, sorry?
Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

Forums » Dev.Opera » Archived Article Discussions