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
<link> tag in XHTML 1.0 trans
Started by Root23, Jan 21 2010 02:17 PM
4 replies to this topic
#1
Posted 21 January 2010 - 02:17 PM
|
|
|
#2
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.
#3
Posted 21 January 2010 - 03:11 PM
Yes, it's a very short file.
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.
<!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.
#4
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:
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:
This will cause a picture to show up next to the URL bar, like the infinity symbol for CodeCall.
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.
Life's too short to be cool. Be a nerd.
#5
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.
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.


Sign In
Create Account


Back to top










