Avatar billede position Nybegynder
31. januar 2002 - 12:48 Der er 1 kommentar

Hvordan koder man download-mulighed på web-site f.eks af billeder?

På mange web-sites har man muligheden for at downloade billede- og tekstfiler ved et museklik. Hvordan koder man denne enkle ting i xhtml-standard?
Avatar billede professoren Nybegynder
31. januar 2002 - 13:04 #1
Sådan:

Document Structure
An XHTML document consists of three main parts:

the DOCTYPE;
the Head, and
the Body.
The basic document structure is

<!DOCTYPE ...>
<html  ... >
<head> ... </head>
<body> ... </body>
</html>

The <head> contains information about the document, such as ownership, copyright, keywords, etc; and the <body> contains the document to be displayed.

Here's a minimal XHTML document:

1: <!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "DTD/xhtml1-transitional.dtd">
2: <html    xmlns="http://www.w3.org/1999/xhtml">
3: <head>
3:    <title>Minimal document</title>
5: </head>
6: <body>
7: <p>
8:    <a href="http://validator.w3.org/check/referer">
        validate</a>
9: </p>
10:</body>
11:</html>

The numbers and colons are not part of the HTML file, but serve to associate the following comments with the lines above:

Specifies the document type.
Declares this to be an HTML document and declares an XML namespace.
The head contains items that are about the document.
The title used in the browser title bar, hotlists, listings, etc.
Closes the head.
body contains the document's displayable content.
Begins a paragraph.
An anchor, to the W3C validator.
Closes the paragraph.
Closes the body.
Closes the html.
<head> elements
<head>   
<title>Web Developer's Virtual Library</title>
    <base    href    = "http://wdvl.internet.com/" />
    <link  rel    =  "STYLESHEET"
        href    = "/Authoring/Style/Sheets/NavMar.css"
        type    = "text/css"    />
    <meta    name    = "Description"
        content    = "The Original Encyclopedia of
        Web Technology... "    />
    <meta    name    = "Keywords"
        content    = "
        VR,CGI,CSS,DOM,URL,SQL,XML,CDF,MCF,OSD,RDF,XSL,
        FAQ,FTP,DTD,DHTML,VRML,HTTP,UNIX,SGML," />
    <meta    name    = "Copyright"
        content    = "1999 internet.com LLC" />
</head>

The <head> element contains 'metadata' for the document, and other information used by the browser but not displayed, e.g. the URI of a style sheet to appl
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester