spclcd

Embed Size (px)

Citation preview

  • 8/6/2019 spclcd

    1/3

    ignore me code allows you to insert comments into an HTML document and have them completely ignored by the browser. This is useful for such things as revision historiesand notes about how to improve the document.

    For example, this code

    ##########################################################The declaration (technically it's not a "tag") should be the veryfirst thing in your document... if you choose to use it at all. tells the browser what version of HTML you are writing in. More specifically, declares that this document conforms to a specific version of HTML,and specifies what version that is.

    The necessity of is a subject of much debate. The standards publi

    shed by W3C require the use of . However, much of the HTML being written does not conform strictly the W3C specifications, and so using (which is, after all, a claim that you conform to the standards) would seemunnecessary.

    This is the declaration for HTML version 3.2:

    For HTML 4.0, the situation is a little more complicated. There are three standard doctypes. The DTD for documents that strictly conform (don't use any deprecated markup) and that aren't frameset documents, use this :

    For a not quite so strict conformance (uses some of the deprecated markup such as ), use this :

    Finally, for documents which are frameset documents (the "top" document in a framed page), use this :

    #######################################################

    My Web PageMy Web PageLet's look at each part of that link:

    Says that the Hypertext REFerence for this anchor is the file "mywebpage.html".When an anchor makes a hypertext reference, we call it a "link".My Web PageThis is the text which appears on the web page. This text is usually highlightedin some way, such as coloring it blue, to indicate that it is "hypertext" (if you click on it, something happens).

    Closes the anchorThis is the simplest type of anchor, but it is probably the kind you will use by

  • 8/6/2019 spclcd

    2/3

    far the most.#########################################################Attribute for NAME = "text string"

    NAME gives the anchor a name. Other links target the anchor using that name. This allows you to link to specific places within the page.

    For example, suppose you have a long page with a section about purchasing. You could create a named anchors in the sub-header for that section like this:

    PurchasingNote that the tag goes inside the tags. Unlike an anchor that uses HREF, a named anchor doesn't change the appearance of the text (unless you set styles for that anchor) or indicate in any way that there is anything specialabout the text. The purpose of the name is that another anchor can link to thenamed anchor.

    To link to a named anchor, add a hash mark to the end of the URL of the page fol

    lowed by the name. For example, to link to a section named purchasing within thepage called anameexample.html we would create a link like this:

    Purchasing######################################################Attribute for TARGET = "_blank" "_parent" "_self" "_top" window name

    TARGET controls where the new document will be displayed when the user follows alink. Most of the time, clicking on a link simply loads a new document in the same window where the link was. However, with TARGET, you can have the new document open in a new window, or if you are using frames, in another frame.

    TARGET = "_blank"

    "_blank" opens the new document in a new window.

    this code produces thisa new window

    TARGET = "_parent"

    "_parent" is used in the situation where a frameset file is nested inside another frameset file. A link in one of the inner frameset documents which uses "_parent" will load the new document where the inner frameset file had been.

    Want a more complete explanation? Here's the idea in pictures.

    For example, this anchor:

    bigframe

    TARGET = "_self"

    "_self" puts the new document in the same window and frame as the current document. "_self" works the same as if you had not used TARGET at all.

    this code produces this

    go to next page

    TARGET = "_top"

  • 8/6/2019 spclcd

    3/3

    "_top" loads the linked document in the topmost frame... that is, the new page fills the entire window.

    this code produces thistop

    TARGET = window name

    window name is used to put the linked document in a frame or window other than the frame the link is in.

    For example, this link

    Spanish Rice####################################################TITLE = "text string"

    W3C says that TITLE is "an advisory title for the linked resource". The idea is

    that TITLE gives a description of the linked resource that is more informative than the URL

    this code produces thisCheck outmy resume