- element, 103–106 online color charts, 349 “Open and Save” tab, 13 opening tags, 25 OpenType fonts, 325 Opera, 16 element (forms), 655, 663, 666, 692 ordered lists, 102–105, 115, 633 orientation property, 400 overriding style inheritance, 284–285 P
elements, 55, 101
tags, 8, 22 padding basics, 405 box model and, 368, 371–372, 377–379 padding-left property, 384 shorthand for, 442–445 paragraphs linking, 55 styling independently (box model), 375–383 parent folders, linking into, 63–65 password element, 689 paths (links) absolute, 136–137, 145 planning, 60–65 relative, 137, 145 percentages positioning elements with, 506 sizing fonts with, 328–329, 334 photo images, size of, 211 Photoshop Elements finding web colors with, 348–349 Matte color menu in, 211 resizing images with, 181 pixels pixel resolutions, 179–180 sizing fonts with, 328 placeholder attribute (forms), 691, 692 “Plain text”, 13 PNG images, 167–168, 172, 203–205, 211 ports, 145 position property, 504–507, 537 poster attribute (video), 584 POST method, 678–680, 692 element, 114 Preferences, TextEdit, 13 preload attribute (), 584 you are here 4 717 www.it-ebooks.info the index properties CSS, 300 of fonts, 312–313 inherited, 301, 464 list-style (CSS), 634 shortcuts for, 466 pseudo-classes, 454–456, 466, 619 pseudo-elements, 698 put command, 130 pwd command (FTP), 131 Q elements, 86–88, 92, 117 R radio buttons, 692 radio element, 653, 663, 668 ragged borders, 389 “range” type, 692 range element, 656 relative font sizing, 328–329 relative links, 154 relative paths absolute paths and, 137 basics, 69–71 grand challenge solutions, 75–76 vs URLs, 145, 159 relative positioning, 506, 536, 537 reload button (browsers), 24 required attribute, 692 required attribute (forms), 691 RGB color values specifying in CSS, 344 web colors and, 340–342 right property, 504 root folders (server), 129–133 rows (HTML tables) adding color to, 618–620 cells spanning multiple, 622–624 columns and, 607 rules, CSS cascade and, 459 combining, 264 ordering of, 293, 459 overriding inherited styles with, 284–285 syntax, 259–260 writing for multiple elements, 264–266 S Safari, 16 sans-serif fonts, 314, 320 saving HTML, 18 images, 187 “Save for Web” option, 183–184, 187, 204–205 screen readers, 157 element, 703 scripting, server-side, 709 element, 562–564, 572–573, 595 element, 692 selecting elements by siblings, 699 elements with ids/classes, 395 element, 655, 663, 665–667 selectors (CSS) basics, 267 class, 288 combining, 698–699 descendant, 437–439 serif fonts, 314, 320 server-side scripting, 651, 709 SFTP (Secure File Transfer Protocol), 132 shortcuts, property, 466 shorthand, CSS, 442–445 718 Index www.it-ebooks.info the index sidebars, laying out, 488–490, 499 sizing/resizing fonts, 312, 328–334 images, 174, 178–184, 183–185 element, 589–591 element (HTML), 448–450, 466 special characters, 112–113 specificity, calculating, 460–461 src attribute (CSS), 68–69, 170, 211, 582, 584 Starbuzz Coffee project adding CSS to, 30–33 basic structure with HTML tags, 21 creating web page, 11–12 loading content into browser, 17 markup, 38 structure, 10 states of links, 453 static positioning, 506, 536, 537 element, 114 styles guide to applying, 292–293 inheriting from parent elements, 281–285 element, 29–32 element, placing, 36 tags, 261–263, 301 stylesheets, multiple, 399–400, 405 styling fonts, 337–339 subfolders, linking into, 60–62 subheadings, HTML, 22 submit buttons, 692 submit element (forms), 652, 663 SVG fonts, 325 T element (HTML), 634 tables, HTML adding captions to, 609–610 adding color to, 618–620 adding styles to, 612–616 cells spanning multiple rows, 622–624 collapsing borders, 616 creating, 603–607 CSS table displays, 537, 607 pasting into web pages, 611 styling lists in, 631–633 tags, HTML basics, 25–42 in Head First Lounge project, 5–6 matching, 25 mismatching, 109–110 nested, 26 Starbuzz Coffee project, 21 starting and ending, 26 structuring text with, 21–23, 39–41 target attribute, 156–157, 159 element, 604–606, 624, 634, 641 tel element (forms), 657, 663 text anti-aliasing, 210 editors, 16 flowing onto web pages, 478 fonts See fonts (CSS) text-align property, 431–433, 466, 634 element (forms), 654, 663, 673, 692 text-decoration property (CSS), 267, 313, 353, 355 TextEdit (Mac), 12–13 text element, 652, 692 wrapping around list markers, 633 element (HTML), 604–606, 634 thumbnails, 192–196, 211 element, 114, 565–566, 595 element, 8, 23–24 title attribute ( element), 147–149 tooltips, 153 top property, 504 element, 604–606 transforms and transitions (CSS), 701–702 transparency in images, 204–205, 210 you are here 4 719 www.it-ebooks.info the index TrueType fonts, 325 type attribute, 51, 652 U element, 103–106, 118–119 underlining text, 267 Unicode, 112–113, 239 unordered lists, 102–105, 633 URLs (Uniform Resource Locators) basics, 134 defined, 159 for images, 171–172 element (forms), 663 url element (forms), 657 UTF-8 encoding, 18, 239, 249 V validating CSS validator, 298–299 W3C Validator, 233–240 value attribute (forms), 663, 692 vendor-specific CSS properties, 700 vertical-align property, 516, 520, 634 element (HTML5) attributes, 584 basics, 580–583 formats, 586–591 :visited pseudo-class, 455 void elements, 98–99, 115, 172 W W3C Validator, 233–238, 249, 298–299 web applications, HTML5 for, 242 web browsers basics, broken images in, 215 built-in default styles, 28 choosing, 16 displaying HTML in, 3–4 displaying HTML tables, 605 displaying HTML video, 585 handling of forms by, 647 handling of images by, 164–166 HTML version support, 228 interpreting HTML, 5–6 loading content into, 17–19 opening pages in, 19 resizing images to fit in, 180–186 selecting, 16 supporting HTML5, 553 whitespace and, 36 web colors basics, 340–342 creating, 355 finding, 348–349 specifying, 343–347 Web Fonts, 325–327, 706 web forms See forms, HTML WebM container, 586–587 web pages adding executable content to, 703 applications for creating, 707 dividing into sections with element, 417–422 how the web works, 2–6 linking to external CSS stylesheets, 273–277 opening in browsers, 19 setting background color, 206 structure of, 115 web pages, constructing adding elements, 90–94 adding element, 96–99 adding element, 86–88 outline, 81 overview, 79 rough design sketch, 80 testing page, 84 web servers basics, editing files on, 132 720 Index www.it-ebooks.info the index moving files to root folder on, 128–131 port 80 and, 145 requests from browsers, 138 root folder, importance of, 129 submitting forms to, 646–647 websites for further information character encoding, 239 CSS3 Media Queries specification, 403 domain names, 126–127 FTP applications, 132 hosting companies, 125 symbol/foreign character abbreviations, 112–113 W3C validator, 233 Web Fonts, 327 weight property (CSS fonts), 335–336 WHATWG and W3C, 591 whitespace, use of, 36 width attribute images, 174 video, 584 width property basics, 426–430 borders and, 387 CSS box model and, 369, 371 height of columns and, 520 setting for elements, 466 windows, linking to new, 155–157 Windows, Microsoft creating HTML files in, 14–15 FTP applications for, 132 specifying fonts for, 321 World Wide Web Consortium (W3C), 249 X XHTML, 99 XHTML5, 708 XML, 223, 225, 708 Z z-index property, 505–506, 537 you are here 4 721 www.it-ebooks.info www.it-ebooks.info getting to know HTML and CSS Colophon All interior layouts were designed by Eric Freeman and Elisabeth Robson The book’s look and feel was based and extended from the original design by Kathy Sierra and Bert Bates The book was produced using Adobe InDesign CS5 and Adobe Photoshop CS The book was typeset using Uncle Stinky, Mister Frisky (you think we’re kidding), Ann Satellite, Baskerville, Comic Sans (can you believe it?), Myriad Pro, Skippy Sharp, Savoye LET, Jokerman LET, Courier New, and Woodrow typefaces Interior design and production all happened on two Mac Pros and two MacBook Airs Writing locations included: Bainbridge Island, Washington; Portland, Oregon; Seaside, Florida; Lexington, Kentucky Long days of writing were powered by zero caffeine and Brew Dr Kombucha, and the sounds of Foster the People, B-52s, Duran Duran, David Bowie, William Shatner, Elvis Presley, Pink Floyd, Genesis, Simple Minds, Ratt, Skid Row, Men without Hats, Men at Work, Berlin, Steve Roach, Tom Waits, Beyman Brothers, and a heck of a lot more 80s music than you’d care to know about. you are here 4 723 www.it-ebooks.info Don’t you know about the website? We’ve got answers to some of the questions in this book, guides to how to more, and daily updates on the blog from the authors! This isn’t goodbye www.it-ebooks.info Bring your brain over to wickedlysmart.com ... (OOA&D) Head First Servlets and JSP Head First SQL Head First Software Development Head First JavaScript Head First Ajax Head First Rails Head First PHP & MySQL Head First Web Design Head First. .. Elisabeth Robson Head First Design Patterns Head First HTML with CSS & XHTML (first edition) Head First HTML5 Programming Other related books from O’Reilly HTML5 : Up and Running HTML5 Canvas HTML5 : The... The Missing Manual HTML5 Geolocation HTML5 Graphics with SVG and CSS3 HTML5 Forms HTML5 Media Other books in O’Reilly’s Head First series Head First C# Head First Java Head First Object-Oriented