Spring.Into.HTML.and.CSS [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Spring.Into.HTML.and.CSS [Electronic resources] - نسخه متنی

Barry J. Rosenberg

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






The head and title Elements


Now you've got the very basic beginnings of a document, with the DOCTYPE declaration in place and the root element at the ready. You'll now begin adding other important pieces of the document, beginning with the head element. This element is where all things necessary for the document's display and performance are placedbut are not literally seen within the browser window. To create the head section, you simply add the head tags within the upper portion of your template, right below the opening <html> tag (see Example 1-4).

Example 1-4. Building the template: Adding a head section

[View full width]


<!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>
</head>
</html>

Notice that the head element requires no attributes but simply has the opening and closing tags. This identifies the head region. Chapter 7, "Using CSS." It is used as needed.

link

The link element is most commonly used to link to an external style sheet, although it can be used for other purposes, such as linking to an alternative page for accessibility, or to link to a favicon, those popular icons you see in the address bar on certain websites.

The title Element in Detail


The title element is the only required element within the head element. This element displays any text within it in the browser bar (see Figure 1-2) along with the browser's name at the end of the text.

Figure 1-2. The title element text will appear in the browser's title bar.

[View full size image]

Aside from the fact that you have to have the title element in place, writing good titles is a first-line technique that accomplishes three things:

Provides a title for the page,

Offers users orientationthat is, it helps them know where they are on the Web and within the site itself

Provides additional information about the site page


Writing effective titles means addressing these three concerns. A good title example appears in Example 1-5.

Example 1-5. Title example with site name and location for user orientation


<title>molly.com books HTML &amp; CSS</title>

Note that the page is titled using the site name, the site section, and the subsection, providing useful information for the visitor.

An ineffective example can be seen in Example 1-6.

Example 1-6. Title example with site name and location for user orientation


<title>Read my books!</title>

Here, there's no information that helps us. So while the technical requirement of having a title is fulfilled, the practical needs are not.Appendix A, "XHTML Reference."


/ 171