Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

<link> tag in XHTML 1.0 trans

XHTML HTML xhtml

  • Please log in to reply
4 replies to this topic

#1 Root23

Root23

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 141 posts

Posted 21 January 2010 - 02:17 PM

For my XHTML class we're supposed to create a template page to use for other pages. The teacher wanted doctype, head, title, body, and basic link and meta tags included.

I looked at w3schools for help, but that didn't much help. Their example used stylesheets in the example, which we haven't learned anything other than the very basics so far.

What would be simple link tag?


Thanks,

Cody
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 21 January 2010 - 02:56 PM

Well, what do you have so far? It sounds like a pretty short file, maybe a dozen lines.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 Root23

Root23

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 141 posts

Posted 21 January 2010 - 03:11 PM

Yes, it's a very short file.


<!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" xml:lang="en" lang="en">

<head profile="http://dublincore.org">
<title>Default</title>
<meta name="Author" content="Cody Hanner" />
<meta name="Description" content="XHTML Class Assignment" />
</head>

<body>
</body>
</html>


I just don't understand the purpose of the link file honestly... with something as simple as this. I don't see what why it's needed.
  • 0

#4 DarkLordoftheMonkeys

DarkLordoftheMonkeys

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 232 posts

Posted 25 January 2010 - 05:50 AM

A <link> tag is basically what the name says. It connects the HTML page to another file. There are two main uses for a <link> tag.

1. Using an external stylesheet:
<link rel="stylesheet" href="mystyles" type="text/css" media="all" />

The media part is not necessary, but it tells the browser what to display the styles for (for example if you want to use different styles for screen display and print).

2. Creating a shortcut icon:
<link rel="icon" href="pic.ico" type="image/x-icon" />

This will cause a picture to show up next to the URL bar, like the infinity symbol for CodeCall.
  • 0
Life's too short to be cool. Be a nerd.

#5 Root23

Root23

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 141 posts

Posted 25 January 2010 - 10:12 AM

Thanks that helps clear up some of my questions.

I still don't understand why the teacher wants us to use it since we're not using CSS and have no icon. But I guess for sake of using it I could make an icon, and link to that.

Edited by Root23, 25 January 2010 - 10:10 PM.

  • 0
Posted Image





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download