Not all attributes are valid on all elements Using this new information Figure

Not all attributes are valid on all elements using

This preview shows page 81 - 83 out of 517 pages.

values they can be assigned. Not all attributes are valid on all elements. Using this new information, Figure 2.6 expands steps 2 and 3 from the previous section’s summary of how SaaS works. Figure 2.6: SaaS from 10,000 feet. Compared to Figure 2.4 , step 2 has been expanded to describe the content returned by the Web server, and step 3 has been expanded to describe the role of CSS in how the Web browser renders the content. Summary An HTML (HyperText Markup Language) document consists of a hierarchically nested collection of elements. Each element begins with a tag in <angle brackets> that may have optional attributes . Some elements enclose content.
Image of page 81
A selector is an expression that identifies one or more HTML elements in a document by using a combination of the element name (such as body ), element id (an element attribute that must be unique on a page), and element class (an attribute that need not be unique on a page). Cascading Style Sheets (CSS) is a stylesheet language describing visual attributes of elements on a Web page. A stylesheet associates sets of visual properties with selectors. A special link element inside the head element of an HTML document associates a stylesheet with that document. The Firefox Web Developer toolbar is invaluable in peeking under the hood to examine both the structure of a page and its stylesheets. Self-Check 2.3.1. True or false: every HTML element must have an ID. False—the ID is optional, though must be unique if provided. Pastebin is the service we use to make it easy to copy-and-paste the code. The link accompanying each code example will take you to that code example on Pastebin. Self-Check 2.3.2. Given the following HTML markup: 1 <p class="x" id="i">I hate <span>Mondays</span></p> 2 <p>but <span class="y">Tuesdays</span> are OK.</p> Write down a CSS selector that will select only the word Mondays for styling. Three possibilities, from most specific to least specific, are: #i span , p.x span , and .x span . Other selectors are possible but redundant or over-constrained; for example, p#i span and p#i.x span are redundant with respect to this HTML snippet since at most one element can have the ID i . Self-Check 2.3.3. In Self-Check 2.3.2 , why are span and p span not valid answers? Both of those selector also match Tuesdays , which is a span inside a p . Self-Check 2.3.4. What is the most common way to associate a CSS stylesheet with an HTML or HTML document? (HINT: refer to the earlier screencast example.) Within the HEAD element of the HTML or HTML document, include a LINK element with at least the following three attributes: REL=”STYLESHEET” , TYPE=”text/css” , and HREF=” uri , where uri is the full or partial URI of the stylesheet. That is, the stylesheet must be accessible as a resource named by a URI. 2.4 5,000 Feet: 3-Tier Architecture & Horizontal Scaling So far we’ve seen how the client communicates with the server and how the information they exchange is represented, but we haven’t said anything about the server itself. Moving back to the server side of Figure 2.2
Image of page 82
Image of page 83

You've reached the end of your free preview.

Want to read all 517 pages?

  • Spring '19
  • Dr.Marcos

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors