The Modernmodern Webweb

Total Page:16

File Type:pdf, Size:1020Kb

The Modernmodern Webweb AA GUIDEGUIDE TOTO MODERNMODERN WEBWEB DEVELOPMENTDEVELOPMENT THE MODERN WEB THE MODERN WEBTHETHE MODERNMODERN WEBWEB MULTI-DEVICE WEB DEVELOPMENT Today’s web technologies are evolving at near–light speed, U Incorporate cross-platform audio and video without WITH HTML5, CSS3, AND JAVASCRIPT bringing the promise of a seamless Internet ever closer to using troublesome plug-ins reality. When users can browse the Web on a three-inch U Make images and graphics scalable on high-resolution phone screen as easily as on a fifty-inch HDTV, what’s a devices with SVG developer to do? U Use powerful HTML5 elements to design better forms Peter Gasston’s The Modern Web will guide you through PETER GASSTON the latest and most important tools of device-agnostic web Turn outdated websites into flexible, user-friendly ones development, including HTML5, CSS3, and JavaScript. that take full advantage of the unique capabilities of any His plain-English explanations and practical examples device or browser. With the help of The Modern Web, emphasize the techniques, principles, and practices that you’ll be ready to navigate the front lines of device- you’ll need to easily transcend individual browser quirks independent development. and stay relevant as these technologies are updated. Learn how to: A B O U T T H E AUTHOR U Plan your content so that it displays fluidly across Peter Gasston has been a web developer for more than multiple devices 12 years in both agency and corporate settings. The author of The Book of CSS3, Gasston has also been published U Design websites to interact with devices using the most in Smashing Magazine, A List Apart, and .net magazine. up-to-date APIs, including Geolocation, Orientation, and He runs the web development blog Broken Links (http:// Web Storage broken-links.com/) and lives in London, England. TH E FINEST I N G EEK ENTERTAINMENT ™ www.nostarch.com “I LI E FLAT.” $34.95 ($36.95 CDN) This book uses RepKover —a durable binding that won’t snap shut. COMPUTERS/WEB PROGRAMMING SHELV E IN: I NDEX Symbols and Numerals and operator for feature queries, 207 @import at-rule, 40 for media queries, 44 @supports at-rule, 102, 207 Android, 19 @viewport at-rule, for setting viewport browsers, 212 parameter, 49–50 anonymous functions . (dot) notation, for storing items, 117 vs. named functions, 92 [] (square bracket) notation, for removing from event handlers, 94 storing items, 117 Apache Cordova, 182 3-D axes, 110 APIs. See device APIs; specific APIs 3-D context app object, in manifest file, 180 detecting device position in, 110 AppCache (Application Cache), 178, WebGL for, 138 185–188 3-D orientation, information sources, caching sequence, 186–187 124, 222 documentation, 189, 225 .appcache file, 185, 186 A Appcelerator Titanium, 184 appendChild() method, 193 a element, dragging, 119 aboutness, 28 Apple, and MP4 format, 166 Application Cache. See AppCache activeElement() attribute, 131 Adaptive Images tool, 63, 64, 221 (Application Cache) adaptive websites, 39 application role, 27 vs. responsive, 53–56 applications. See TV apps; web apps arc() method, 136 add() method, 97 Archibald, Jake, 185 addEventListener method, 91–94 Adobe, 1, 182, 210, 226 areas in grid, 78, 79 Edge Inspect, 19 aria-haspopup attribute, 26 open standards, 200 article element, 22–24 agents, detecting dimension, 41 width of, 59 aside element, 22 align-content property, 77 aspect ratio align-items property, 74 alignment of device or viewport, 43 in Flexbox, 73 maintaining, 60 in grid layout, 83–84 assistive technology automatic focus and, 144 align-self property, 75 browser awareness of interactive all media type, for media queries, 44 content, 26 all value, for column-span property, 68 almost standards mode, 15 asynchronous execution of scripts, 90–91 alpha property, for orientation, 111 Atkins, Tab, 85 alt attribute, for picture element, 62 Amazon Kindle, 6 audio element, 116, 162–163 Ambient Findability (Morville), 38, 219 multiple source files for, 164 audio format, variation in browser break-inside property, 68–69 support, 166 breakpoints, 53 audio() method, 173 content, 57–59, 64, 220 AudioContext() method, 174 breaks for columns, 68–70 auto value broadband connections, 8 for column-fill property, 67 Brown, Brennen, 10, 218 for height property, 60 browsers, 12 for preload attribute, 163 alert on size, 52 autocomplete attribute for form, 145 default behavior, 90 autofocus attribute for form, 144 desktop, 3 autoplay attribute, for media developer tools in, 12 elements, 163 experimental features, enabling, avoid-column value, for break-before 212–213 property, 69 implementation of client-side axes validation, 154 in Flexbox, 73 rendering modes, 14–15 in Orientation API, 110 support, 18–19, 211–216 “business card” syntax, 29 business-to-business (B2B) sites, 2 B B2B (business-to-business) sites, 2 C balance value, for column-fill property, 67 bandwidth attribute, of connection caching sequence, 186–187 object, 115 calc() function, 55–56 banner role, 27 Camen, Kroc, 167, 175, 224 baseline value, for align-items camera, 116–117 property, 74 accessing data stream from, 175 Battery Status API, 114–115 canvas information sources, 124, 222 information sources, 140, 223 battery, vibrating impact on, 113 vs. SVG files, 138–139 beta property, for orientation, 111 canvas element, 125, 135–138 Beverloo, Peter, 106, 221 captions, for media files, 167–168 Bidelman, Eric, 209, 225 cascading variables, 200, 208–209, bitmap images, 46 210, 226 vs. vector graphics, 126 CDATA section in SVG file, 129 Blackberry, 19 center value blockquote element, 24 for align-items property, 74 Blooman, Patrick, 20, 219 for grid alignment properties, 83 Blueprint.css file, 18 for justify-content property, 73 Boolean attributes, 16 for object-position property, 61 Bootstrap framework, 18 chaining methods in jQuery, 99 border-box value, for box-sizing change event handler, in Network property, 54 Information API, 116 both keyword, for wrap-flow property, 203 charging attribute, of navigator.battery bottom value, for object-position object, 114 property, 61 chargingchange event, in Battery Status Boulton, Mark, 85, 87, 221 API, 115 Box Alignment module, information chargingTime attribute, of navigator.battery sources, 210, 226 object, 114 box-sizing property, 54–55, 207 chargingtimechange event, in Battery break-after property, 68–69 Status API, 115 break-before property, 68–69 charset attribute, for meta tag, 15 checkValidity() method, 156 228 Index child elements, in grid, 78 connection object, attributes, 115 Christian, Mark, 189, 225 Constraint Validation API, 156–158 Chrome (browser), 3 information sources, 160, 224 enabling experimental Contacts API, 123 features in, 213 contacts object, 183 Chrome for Android, Geolocation contain keyword opt-in prompt, 108 for object fit, 60–61 Chrome Web Store, 178 for object-position property, 61 documentation from, 188, 225 contains() method, 97, 120–121 manifest file for, 179–180 content attribute, 49 Chromium, 212 content breakpoints, 57–59, 64, 220 circle element in SVG, 127–128, 131 content element, 199 circles, arc() method for, 136 content object, to access web Cisco, 10, 217 template, 193 classes in JavaScript, interaction with, contentinfo role, 27 97–98 context classList object, 97 for canvas element, 135 clear keyword, for wrap-flow property, for content, 28 203–204 for device use, 7–9 clear() method, 118 controls attribute, for media clearWatch() method, 109 elements, 162 click event, information in cookies, 117 object from, 93 coords child object, 108 client-side validation cover keyword, for object fit, 60–61 disabling, 155 create() function, for contacts object, 183 of HTML form data, 154–156 createObjectURL() method, 117 cloneNode() method, 193 createShadowRoot() method, 198 closing empty elements, 16 CreativeJS, 176, 224 Coenraets, Christopher, 106, 222 cross axis, in Flexbox, 73 color input, 150–151 CSS color picker, 150–151 future of, 200–209 color query, for ebook reader, 51 Box Alignment module, 206 column value cascading variables, 208–209 for break-before property, 69 Exclusions, 202–205, 210, 226 for flex-direction property, 71 feature queries, 207–208 column-count property, 66–67, 207 Line Grid module, 206 column-fill property, 67 Paged Media module, 206 column-gap property, 67–68 Pagination Templates, 206 column-reverse value, for flex-direction Regions, 200–202 property, 71–72 and HTML forms, 159 column-rule property, 68 inheritance in, 195–196 column-span property, 68 preprocessors, 208 columns property, 67 web component conflicts, 192 column-width property, 66–67 CSS box model, 54 combining media queries, 44–45 CSS Exclusions, 202–205 comma separator, in media queries, 44 CSS layouts, 65–87 comments, in .appcache file, 186 browser support, 214 complementary role, 27 convergence with SVG, 134–135 condition, YepNope to test, 100 Flexbox module, 70–78 conditional elements, for HTML5 adding flexibility, 75–76 in IE, 25 alignment inside container, config.xml manifest file, 181 73–75 Index 229 CSS layouts, Flexbox (continued) data property, for image changing content order, 71–72 manipulation, 137 checking browser for data storage, user agents for, 117 properties, 101 datalists, for form input suggestions, declaring model, 70–71 146–147 information sources, 87, 221 dataset property, 35 wrap and flow, 76–78 datatransfer object, 120, 121 Grid Layout module, 18, 78–86 datatypes, specifying for element, 120 alignment and stacking, 83–84 date-picker widget, 149 Exclusions and, 204–205 dates, input types in forms, 148–150
Recommended publications
  • Consonant Characters and Inherent Vowels
    Global Design: Characters, Language, and More Richard Ishida W3C Internationalization Activity Lead Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 1 Getting more information W3C Internationalization Activity http://www.w3.org/International/ Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 2 Outline Character encoding: What's that all about? Characters: What do I need to do? Characters: Using escapes Language: Two types of declaration Language: The new language tag values Text size Navigating to localized pages Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 3 Character encoding Character encoding: What's that all about? Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 4 Character encoding The Enigma Photo by David Blaikie Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 5 Character encoding Berber 4,000 BC Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 6 Character encoding Tifinagh http://www.dailymotion.com/video/x1rh6m_tifinagh_creation Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 7 Character encoding Character set Character set ⴰ ⴱ ⴲ ⴳ ⴴ ⴵ ⴶ ⴷ ⴸ ⴹ ⴺ ⴻ ⴼ ⴽ ⴾ ⴿ ⵀ ⵁ ⵂ ⵃ ⵄ ⵅ ⵆ ⵇ ⵈ ⵉ ⵊ ⵋ ⵌ ⵍ ⵎ ⵏ ⵐ ⵑ ⵒ ⵓ ⵔ ⵕ ⵖ ⵗ ⵘ ⵙ ⵚ ⵛ ⵜ ⵝ ⵞ ⵟ ⵠ ⵢ ⵣ ⵤ ⵥ ⵯ Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 8 Character encoding Coded character set 0 1 2 3 0 1 Coded character set 2 3 4 5 6 7 8 9 33 (hexadecimal) A B 52 (decimal) C D E F Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 9 Character encoding Code pages ASCII Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 10 Character encoding Code pages ISO 8859-1 (Latin 1) Western Europe ç (E7) Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 11 Character encoding Code pages ISO 8859-7 Greek η (E7) Copyright © 2005 W3C (MIT, ERCIM, Keio) slide 12 Character encoding Double-byte characters Standard Country No.
    [Show full text]
  • Picking a Rendering Mode
    1245xAPPA 7/17/02 9:26 AM Page 1 PICKING A RENDERING MODE Standing in the middle of yesterday Where it all went wrong—where we made mistakes I’m sorry for the things I forgot to say But it won’t be long until it will be okay —RAINE M AIDA SUPPOSE YOU’VE SPENT A FEW YEARS and several million dollars developing a product that rapidly scans Dewey Decimal numbers on book spines and sends those num- bers to a central database. This enables libraries to keep track of what they physically have on hand. You sell your product to hundreds of libraries all over the country and get a lot of rave reviews. Then one day a large number of libraries decide to abandon Dewey and go to an alternate system, one that allows for more expansion. Many of your customers will be making this switch, but they still want to use your device. They’re willing to pay for an upgrade, and you could provide one, but if you change the product to use this new system, it won’t read the Dewey numbers any- more. That would prevent your other, Dewey-based clients from buying the upgrade and would turn away some new customers. 1245xAPPA 7/17/02 9:26 AM Page 2 2 The simple answer is to build both systems into the device and put a switch on the side so that users can pick which scanning mode they want. This gives you a more flexible device that doesn’t turn away any customers.
    [Show full text]
  • Doctype Switching in Modern Browsers
    Thomas Vervik, July 2007 Doctype switching in modern browsers Summary: Some modern browsers have two rendering modes. Quirk mode renders an HTML document like older browsers used to do it, e.g. Netscape 4, Internet Explorer 4 and 5. Standard mode renders a page according to W3C recommendations. Depending on the document type declaration present in the HTML document, the browser will switch into either quirk mode, almost standard or standard mode. If there is no document type declaration present, the browser will switch into quirk mode. This paragraph summaries this article. I will explain how the main browsers on the marked today determine which rendering mode to use when rendering the (x)html documents they receive. I have tested nearly all my assertions in Internet Explorer 6, Firefix 2 and Opera 9.02. The validation is done at the official W3 validation page http://validator.w3.org. Some of my assertions are tested using pages on the net. This is done when testing the media types ‘text/html’ and ‘application/xhtml+xml’with html and xhtml with both legal and illegal syntax. My previous article was full of vague assertions and even things that were directly wrong. This should not be the case in this article where nearly all the assertions are tested. One section I should be humble about is the ‘Doctype dissection’. Finding good sources decribing these in more detail than pages and books just briefly describing their syntax proved hard, but I have done my best and have also described in the text which section I’m certain about and the one I am more uncertain about.
    [Show full text]
  • Introduction to HTML/CSS/SVG/D3
    D3 Tutorial Introduction of Basic Components: HTML, CSS, SVG, and JavaScript D3.js Setup Edit by Jiayi Xu and Han-Wei SHen, THe OHio State University HTML - Hyper Text Markup Language • HTML is the standard markup language for creating Web pages • HTML describes the structure of Web pages using markup • HTML elements • HTML elements are the building blocks of HTML pages • represented by tags • Tags • HTML tags label pieces of content such as • <head> tag for “heading” • <p> for “paragraph” • <table> for “table” and so on • Browsers do not display the HTML tags, but use them to render the content of the page HTML - Plain Text • If we display the information only by plain text HTML Basics HTML is designed for marking up text by adding tags such as <p> to create HTML elements. Example image: HTML - Codes and the Result HTML - DOM • When a web page is loaded, the browser creates a Document Object Model of the page • The HTML DOM model is constructed as a tree of Objects HTML - DOM Document Root element: <html> Element: Element: <head> <body> Element: Element: Element: Element: <p> Element: <p> <title> <h1> <img> "to create Text: "HTML Text: "HTML Element "is designed Element: "by adding Element Element: Attribute: Attribute: HTML Tutorial" Basics" <strong> for" <em> tags such as" <code> <strong> "src" "style" elements. " "marking up “Example "HTML" "<p>" text" image” HTML - DOM • With the object model, JavaScript can create dynamic HTML by manipulating the objects: • JavaScript can change all the HTML elements in the page • Change all the
    [Show full text]
  • Demo: Html5 Structure
    Demo: html5 structure Simple Text/Web Editor • TextEdit –make plain text (osx) • Notepad++ (windows) • TextWrangler (osx) • Coda 2 (osx) • Sublime Text 2 (osx & windows) • Brackets (osx & windows) General Workflow (nomadic version) • Set up/verify web folder on local hard drive • Set up FTP (file transfer protocol) client • Download web files (html, css, jpg, gif, png) from server to local folder • Open/create web files from the local web folder (ONLY) • Edit web files • Test locally in browser (chrome) • Chrome inspect element • Validate code (w3c validator) • Upload web files from local drive to server • Test live in browser (multiple browsers) Coda 2 Setup • Launch Coda • Add new site o Nickname > general site keywords o Protocol > SFTP o Server > redwood.colorado.edu o User Name > youridentikey o Password > your redwood password o Root URL > http://redwood.colorado.edu/youridentikey ! Include subdirectory if applicable o Local URL > leave blank (advanced local server feature) o Remote Root > blank for root directory ! Subdirectory if applicable o Local Root > Set to local web folder • Double click on site thumbnail to launch • Select Files • Verify local and remote (server) connection • !!!Coda bug – Quit Coda and re-launch application • Double click on site thumbnail again • Test o Open local html page o Make minor change (carriage return) o Save o Badge should pop up on publish icon • Good to go. What is html? • acronym for hypertext markup language • hypertext means ability jump to another document (links) • markup is a language for describing web pages. • markup tags define the structure of content in web pages • “view source” in any browser to see the html markup of a webpage html tags • html markup is called “tags” • tags are special keywords surrounded by angle brackets o <html> <body><head><title> • html tags normally come in pairs o <p> ….
    [Show full text]
  • DOCTYPE Sniffing
    06_576429 ch02.qxd 11/18/04 12:28 PM Page 17 2 Document Standards This chapter explores the various options for a document foundation. CSS is a dynamic tool, in that you can use it in more than one type of document, including HTML, XHTML, and XML docu- ments. Each type of document may have several variations, flavors, or degrees of strictness. This chapter describes what’s involved in creating each type. Document standards are something very important to the aspiring CSS web designer. Inclusion of a Document Type Declaration (explained in a moment) and a well-formed document may mean the difference between a splitting, grueling headache and a mark-up document including CSS that works as expected in all the major browsers. Chapter 1 discussed the W3C body, the group assem- bled to decide on web standards. This chapter examines the various documents into which you can incorporate CSS, describing what each document looks like and giving you a few very basic examples of each document in action. The explanation of each topic in the following list is quite lengthy and can easily fill an entire book. This chapter covers only the basics, including ❑ Writing mark-up ❑ Obtaining the required web browsers ❑ Introduction to HTML, XML, and XHTML ❑ Introduction to the Document Type Declaration ❑ DOCTYPECOPYRIGHTED sniffing and how to invoke standards MATERIAL mode ❑ Creating web documents that survive and perpetuate into the foreseeable future Choosing Which Markup Language to Use HTML, XHTML, and XML are all based on SGML, which stands for Standard Generalized Markup Language. SGML is the parent of tag-based languages like HTML, XHTML, and XML, although it is not limited to these three examples.
    [Show full text]
  • 5 Parts 3 Ways to Include CSS CSS Rule Color Model Font CSS Box
    Border-style: solid/douBle min-height, max-height, height CSS3 Border-color width: 1000% loat, clear cornerstone Border-width (create arrow) text-align (left, justify, right) 5 parts Border-image overPlow, overPlow-x, overPlow-y 1. Page layout Border-radius (circle, eclipse, prove) visible, hidden, scroll, auto 2. Element styles Page layout 3. Element position Examples of Block, inline, inline-block overPlow for Ploat child cornerstone loat, inline-block cornerstone 4. Responsive design elements column-count, column-gap 5. Animation Box-shadow display cornerstone CSS selectors 3 ways to include CSS inline, inline-block, Block, none list-style Syntax examples: Inline / Embedded / External Border-collapse (for taBle) *, tag, #id, .class default width/height for each type background image s1, s2 (select all s1 and all s2) set width/height for each type background-image: url(…) s1 s2, s1>s2, s1+s1, s1~s2 CSS rule visibility Background-image: url(…), url(…) [att], [attr=”val”] Selector, Property, Value :active, :focus, :hover, Box-sizing cornerstone background-repeat:no-repeat ::after, ::before Color model Background-repeat:no-repeat, repeat :required, color How margin and padding work for Background-position :Pirst-child, :last-child, Background-color: linear-gradient(to inline, inline-block and Block elements top, right, Bottom, left :nth-child(n), :nth-last-child(n) Bottom right, red, Blue) center ::Pirst-letter, ::Pirst-line, :root rgB,rgba,hex,hsl,name How margin works when set width :not(selector) Background-size opacity margin: collapse, negative auto, cover, contain CSS speciPicity Element styles Background-attachment 1. !important > inline style > id Font scroll, local, ixed selector > pseudo class > class or font-family (5 basic fonts, typography) cursor attribute selector > tag font-size (px, %, em, rem) outline 2.
    [Show full text]
  • Understand the CSS Box Model
    Concordia University SOEN 287: Web Programming 1 – Winter 2016 Assignment 2 ______________________________________________________________________________ Due Date: By 11:55pm Sunday February 14, 2016 Evaluation: 4% of final mark Late Submission: none accepted Type: Individual Assignment Purpose: The purpose of this assignment is to have you practice cascade style sheets and HTML5 tags. CEAB Attributes: This assignments is primarily evaluating your use of the CSS and the HTML5 tags (Use of engineering tools) ______________________________________________________________________________ Exercise 1: Understand the CSS box model The image below illustrates the CSS box model: Figure 1. The CSS Box Model Please use the <div> to implement a page illustrated below. 1) You can use any color combinations for the border and the background; 2) you can decide the width of the paragraph in the border; 3) when you resize the browser window, the text are automatically wrapped. Figure 2. A sample page Exercise 2: Pseudo Class Selector and Navigation Bar Use <list> to create a vertical “navigation bar”. “Home” is the current page (active), with a green background color and a white text. The other non-active items have a grey background and a white text. When mouse is over a non-active item, the text changes to white with black background. Figure 3 is a demo. Figure 3. A sample page of navigation bar Exercise 3 On a single HTML page, include the following two div container elements in the body. Using an external style sheet, add style to the div elements such that one div has some overlap with the second div (Hint: make use of relative or absolute positioning).
    [Show full text]
  • Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification
    Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification W3C Recommendation 07 June 2011, edited in place 12 April 2016 to point to new work This version: http://www.w3.org/TR/2011/REC-CSS2-20110607 Latest version: http://www.w3.org/TR/CSS2 Previous versions: http://www.w3.org/TR/2011/PR-CSS2-20110412 http://www.w3.org/TR/2008/REC-CSS2-20080411/ Latest editor's draft: http://dev.w3.org/csswg/css2/ Editors: Bert Bos <BERT @w3.org> Tantek Çelik <TANTEK @cs.stanford.edu> Ian Hickson <IAN @hixie.ch> Håkon Wium Lie <HOWCOME @opera.com> Please refer to the errata for this document. This document is also available in these non-normative formats: plain text, gzip'ed tar file, zip file, gzip'ed PostScript, PDF. See also translations. Copyright © 2011 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C LIABILITY, TRADEMARK AND DOCUMENT USE rules apply. Abstract This specification defines Cascading Style Sheets, level 2 revision 1 (CSS 2.1). CSS 2.1 is a style sheet language that allows authors and users to attach style (e.g., fonts and spac- ing) to structured documents (e.g., HTML documents and XML applications). By separating the presentation style of documents from the content of documents, CSS 2.1 simplifies Web authoring and site maintenance. CSS 2.1 builds on CSS2 [CSS2] p. 284 which builds on CSS1 [CSS1] p. 283. It supports media-specific style sheets so that authors may tailor the presentation of their documents to visual browsers, aural devices, printers, braille devices, handheld devices, etc. It also sup- ports content positioning, table layout, features for internationalization and some properties related to user interface.
    [Show full text]
  • INTRODUCTION to HTML 5 – PART 2 Description Usage
    INTRODUCTION TO HTML 5 – PART 2 In this page we have discussed Description, Usage, Attributes, Example, Result and Compatibility of HTML5 article element. Description The HTML Article element (<article>) represents independent (w.r.t a web document, page, site or application) content, for example a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget. The HTML Article Element contains either actual content or contains several different section elements or one or more article elements within it. If it contains article element within it, the content of the inner articles supposed to be related to the outer article's content. If it is necessary to provide author information of the article, that can be done using <address>. Using pubdate attribute of time element, date and time of publication of an article can be described. Usage <article> <h1>Tutorial of HTML5 article element</h1> <p>HTML5 article element represents independent item like a blog entry in an web document.</p> </article> Whether start and end tag are required Both start and end tag are required. What an article element can contain Text or embedded content. Which elements can contain article element Any element except the elements which can contain text or embedded content. Attributes article element does not have any other attributes than the global attributes (accesskey, class, contenteditable, contextmenu, dir, draggable, dropzone, hidden, id, lang, spellcheck, style. tabindex, title), common to all elements. Example view plainprint? 1. <!DOCTYPE HTML> 2. <html lang="en"> 3. <head> 4. <meta charset=utf-8> 5.
    [Show full text]
  • HTML5 and CSS3 Illustrated
    HTML5 and CSS3 Illustrated Unit H: Implementing Page Layout with HTML and CSS Objectives Assess the CSS box model Construct a multicolumn layout with float Implement relative positioning Implement absolute positioning HTML 5 and CSS 3 – Illustrated Complete 2 Objectives (continued) Stack elements Create a multicolumn layout using positioning Create a fluid layout Control the visibility of elements HTML 5 and CSS 3 – Illustrated Complete 3 Assessing the CSS Box Model Box model: used by CSS to represent characteristics of every Web page element Ø Treats element as rectangular box Border: border surrounding element Margin: space from border to neighboring/parent element Padding: space between border and element content HTML 5 and CSS 3 – Illustrated Complete 4 Assessing the CSS Box Model (continued) Size of padding, margin, and border increase the amount of space occupied by an element Ø Dimensions of these properties not included in specified width / height • Specified width and height refer only to the content of an element When fitting elements into limited space, subtract padding, margin, and border area to get width or height HTML 5 and CSS 3 – Illustrated Complete 5 Assessing the CSS Box Model (continued) When bottom margin of one element is adjacent to top margin of another, the margins combine to the size of the larger of the two Ø Affects element size planning Separate property for each side of padding and margin Ø e.g., padding-top:2px; margin-right:1em; HTML 5 and CSS 3 – Illustrated Complete 6 Assessing the CSS Box Model (continued) Can set a common value using generic property Ø e.g., padding:0; Can use shorthand to set different values.
    [Show full text]
  • Learning XML.Pdf
    Learning XML Erik T. Ray First Edition, January 2001 ISBN: 0-59600-046-4, 368 pages XML (Extensible Markup Language) is a flexible way to create "self-describing data" - and to share both the format and the data on the World Wide Web, intranets, and elsewhere. In Learning XML, the author explains XML and its capabilities succinctly and professionally, with references to real-life projects and other cogent examples. Learning XML shows the purpose of XML markup itself, the CSS and XSL styling languages, and the XLink and XPointer specifications for creating rich link structures. Release Team[oR] 2001 Preface 1 What's Inside Style Conventions Examples Comments and Questions Acknowledgments 1 Introduction 5 1.1 What Is XML ? 1.2 Origins of XML 1.3 Goals of XML 1.4 XML Today 1.5 Creating Documents 1.6 Viewing XML 1.7 Testing XML 1.8 Transformation 2 Markup and Core Concepts 25 2.1 The Anatomy of a Document 2.2 Elements: The Building Blocks of XML 2.3 Attributes: More Muscle for Elements 2.4 Namespaces: Expanding Your Vocabulary 2.5 Entities: Placeholders for Content 2.6 Miscellaneous Markup 2.7 Well-Formed Documents 2.8 Getting the Most out of Markup 2.9 XML Application: DocBook 3 Connecting Resources with Links 60 3.1 Introduction 3.2 Specifying Resources 3.3 XPointer: An XML Tree Climber 3.4 An Introduction to XLinks 3.5 XML Application: XHTML 4 Presentation: Creating the End Product 88 4.1 Why Stylesheets? 4.2 An Overview of CSS 4.3 Rules 4.4 Properties 4.5 A Practical Example 5 Document Models: A Higher Level of Control 119 5.1 Modeling
    [Show full text]