Beginning CSS: Cascading Style Sheets for Web Design

Total Page:16

File Type:pdf, Size:1020Kb

Beginning CSS: Cascading Style Sheets for Web Design www.GetPedia.com 01_576429 ffirs.qxd 11/18/04 12:25 PM Page iii Beginning CSS: Cascading Style Sheets for Web Design Richard York 01_576429 ffirs.qxd 11/18/04 12:25 PM Page i Beginning CSS: Cascading Style Sheets for Web Design 01_576429 ffirs.qxd 11/18/04 12:25 PM Page ii 01_576429 ffirs.qxd 11/18/04 12:25 PM Page iii Beginning CSS: Cascading Style Sheets for Web Design Richard York 01_576429 ffirs.qxd 11/18/04 12:25 PM Page iv Beginning CSS: Cascading Style Sheets for Web Design Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2005 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 0-7645-7642-9 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 1B/QZ/RS/QU/IN No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, e-mail: [email protected]. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTIC- ULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMO- TIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PRO- FESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Cataloging-in-Publication Data: 2004-024-101 Trademarks: Wiley, the Wiley Publishing logo, Wrox, the Wrox logo, Programmer to Programmer and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affil- iates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book. 01_576429 ffirs.qxd 11/18/04 12:25 PM Page v About the Author Richard York is a freelance web designer and a participant in the open source community. After attend- ing website and graphic design courses at Indiana University-Purdue University, Indianapolis in Indianapolis, Indiana, Richard continued a course of self-study which involved mastering design of web sites using web technologies like CSS, XHTML, and PHP. When not writing for Wrox or building a website, Richard works on open source webmail applications written for PHP PEAR, an open source repository of PHP applications. Richard also enjoys writing poetry, playing music, and painting. He maintains a website at www.smilingsouls.net that exhibits his personal and professional interests. 01_576429 ffirs.qxd 11/18/04 12:25 PM Page vi 01_576429 ffirs.qxd 11/18/04 12:25 PM Page vii Credits Senior Acquisitions Editor Vice President and Publisher Jim Minatel Joseph B. Wikert Development Editors Project Coordinator Tom Dinse Erin Smith Brian Herrmann Jodi Jensen Graphics and Production Specialists Lisa England Production Editor Carrie Foster Angela Smith Denny Hager Joyce Haughey Technical Editor Jennifer Heleine Wiley-Dreamtech India Pvt Ltd Quality Control Technician Copy Editor John Greenough Mary Lagu Joe Niesen Editorial Manager Media Development Specialist Mary Beth Wakefield Angela Denny Vice President & Executive Group Publisher Proofreading and Indexing Richard Swadley TECHBOOKS Production Services 01_576429 ffirs.qxd 11/18/04 12:25 PM Page viii 02_576429 ftoc.qxd 11/18/04 12:27 PM Page ix Contents Acknowledgments xix Introduction 1 Chapter 1: Introducing Cascading Style Sheets 9 Who Creates and Maintains CSS? 10 How the Internet Works 11 Abridged History of the Web 12 How CSS Came to Be 13 Advantages of Using CSS 14 Summary 14 Chapter 2: Document Standards 17 Choosing Which Markup Language to Use 17 How to Write Markup 18 Which Browser to Use 19 Microsoft Internet Explorer 20 Gecko: Mozilla, Mozilla Firefox, and Netscape 21 Opera 22 KHTML: Safari and Konqueror 22 Introduction to HTML 23 Single Tags and HTML Line Breaks 23 HTML Attributes 25 XML 28 XHTML 31 XHTML Is Case-Sensitive 31 All Attribute Values Must Be Enclosed in Quotes 31 No Attribute Minimization Allowed 32 All Elements Require Both an Opening and Closing Tag 32 Why XHTML Is the Future 33 The Document Type Declaration 36 DOCTYPE Sniffing 37 Common Document Type Declarations 40 HTML 4.01 Transitional 40 HTML 4.01 Frameset 40 02_576429 ftoc.qxd 11/18/04 12:27 PM Page x Contents HTML 4.01 Strict 41 XHTML 1.0 Transitional 41 XHTML 1.0 Frameset 41 XHTML 1.0 Strict 41 Summary 42 Exercises 42 Chapter 3: The Basics of CSS Anatomy and Syntax 43 CSS Rules 43 Introducing Selectors 44 Grouping Selectors and Declarations 44 Including CSS in a Document 49 Including an Embedded Style Sheet 49 Linking to External Style Sheets 50 Importing Style Sheets 50 How to Structure an External CSS Document 51 Inline Styles 52 CSS Comments 54 Summary 54 Exercises 55 Chapter 4: Data Types, Keywords, Color, Length, and the URI 57 Keywords 57 Strings 59 Length and Measurement Options 63 Inconsistencies with Absolute Measurements 64 Metric Measurements 64 Typographical Measurements 65 Relative Length Measurements 65 Measurements Based on the Height of the Lowercase Letter x 67 Pixel Measurements 67 Percentage Measurements 68 Integers and Real Numbers 68 Colors 69 Color Keywords 70 RGB Colors 70 Hexadecimal Colors 71 Short Hexadecimal and Web-Safe Colors 72 The URI 73 Summary 74 Exercises 75 x 02_576429 ftoc.qxd 11/18/04 12:27 PM Page xi Contents Chapter 5: CSS Selectors 77 The Universal Selector 77 Contextual/Descendant Selectors 78 Direct Child Selectors 85 Direct Adjacent Sibling Combinator 89 Indirect Adjacent Sibling Combinators 92 Attribute Selectors 93 Selection Based on the Presence of an Attribute 93 Selection Based on the Value of an Attribute 94 Attribute Substring Selectors 95 Selection Based on Attribute Values That Begin with a String 95 Selection Based on Attribute Values That End with a String 95 Selection Based on Attribute Values That Contain a String 96 Class and ID Selectors 100 Summary 105 Exercises 106 Chapter 6: Pseudo-Element and Pseudo-Class Selectors 107 Pseudo-Elements 107 ::first-letter and ::first-line 108 ::selection 110 ::before and ::after 111 Pseudo-Classes 113 Dynamic Pseudo-Classes 113 :link and :visited 113 :hover 114 :active 115 :focus 116 Structural Pseudo-Classes 120 :root 120 :first-child 121 :last-child 121 :empty 122 The Negation Pseudo-Class :not 126 The :target Pseudo-Class 128 Summary 132 Exercises 133 xi 02_576429 ftoc.qxd 11/18/04 12:27 PM Page xii Contents Chapter 7: Inheritance and the Cascade 135 Inheritance 135 The inherit Keyword 137 The Cascade 137 Calculating the Specificity of a Selector 139 !important Rules 155 Custom Style Sheets 156 Specifying a Custom Style Sheet Using MSIE 156 Specifying a Custom Style Sheet Using Mozilla 156 Customizing Mozilla Using CSS 158 Summary 161 Exercises 162 Chapter 8: Text Manipulation 163 The JT’s Website 164 Developing a Design Strategy 164 Creating the Directory Structure 165 Settling on a Table of Contents 167 The letter-spacing Property 175 The word-spacing Property 179 Indenting Paragraph Text Using text-indent 181 Aligning Text with the text-align Property 185 Justifying Text 186 The text-decoration Property 191 The text-transform Property 196 The white-space Property 199 A Look Ahead to CSS 3 200 Summary 201 Exercises 202 Chapter 9: Font Manipulation 203 Specifying Fonts with the font-family Property 203 Generic Font Families 206 The font-style Property 211 The font-variant Property 215 The font-weight Property 216 Relative Values 218 xii 02_576429 ftoc.qxd 11/18/04 12:27 PM Page xiii Contents The font-size Property 221 Absolute Font Sizes 222 Relative Font Sizes 223 Percentage Font Sizes 225 The font Shorthand Property 230 System Fonts 232 Summary
Recommended publications
  • Style Sheets CSS
    P1: OSO/OVY P2: OSO/OVY QC: OSO/OVY T1: OSO GTBL013-03 GTBL013-Jackson-v10 July 12, 2006 10:36 CHAPTER 3 Style Sheets CSS As we have learned, HTML markup can be used to indicate both the semantics of a document (e.g., which parts are elements of lists) and its presentation (e.g., which words should be italicized). However, as noted in the previous chapter, it is advisable to use markup predominantly for indicating the semantics of a document and to use a separate mechanism to determine exactly how information contained in the document should be presented. Style sheets provide such a mechanism. This chapter presents basic information about Cascading Style Sheets (CSS), a style sheet technology designed to work with HTML and XML documents. CSS provides a great deal of control over the presentation of a document, but to exercise this control intelligently requires an understanding of a number of features. And, while you as a software developer may not be particularly interested in getting your web page to look “just so,” many web software developers are members of teams that include professional web page designers, some of whom may have precise presentation require- ments. Thus, while I have tried to focus on what I consider key features of CSS, I’ve also included a number of finer points that I believe may be more useful to you in the future than you might expect on first reading. While CSS is used extensively to style HTML documents, it is not the only style- related web technology.
    [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]
  • 1Lesson 1: Markup Language and Site Development Essentials
    1Lesson 1: Markup Language and Site Development Essentials Objectives By the end of this lesson, you will be able to: 2.1.1: Relate the history of markup languages to current techniques and technologies, including Standard Generalized Markup Language (SGML), previous versions of Hypertext Markup Language (HTML). 2.1.2: Identify the format and various versions of HTML, including HTML 4.01, Extensible HTML (XHTML), HTML5. 2.1.8: Explain the importance of consistently developing to a single W3C standard (e.g., HTML5). 2.6.1: Describe the functionality of XML. 2.7.1: Obtain input from stakeholders about acceptable technologies and color combinations. 2.7.2: Create an initial Web site diagram (i.e., a story board or prototype), and translate it into a site map. 2.7.3: Verify compliance with government and industry accessibility standards, including W3C Web Accessibility Initiative (WAI), U.S. Government Section 508, Americans with Disabilities Act (ADA). 2.7.4: Validate Web page design according to technical and audience standards adopted by employers. 2.7.5: Verify Web site usability, viewability and browser compatibility. 2.12.1: Test and validate Web documents. 2.12.3: Test Web pages in multiple browsers. 2.13.1: Work as a team member to develop pages and sites. 1-2 Site Development Associate 2.13.2: Collaborate with technical (e.g., IT) and non-technical (e.g., marketing) members of the organization to ensure sites meet requirements. 2.13.3: Determine information and audience requirements for a site, including stakeholders such as customers, employees, shareholders, suppliers. 2.13.4: Document a Web site plan.
    [Show full text]
  • Cascading Style Sheets for PGDCA HTML Styles – CSS Cascading Style Sheets (CSS) Is a Style Sheet Language Used for Describing
    Cascading Style Sheets for PGDCA Semester –II PGDCA-204 By: Arshdeep Singh, University computer centre HTML Styles – CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript. CSS describes how HTML elements are to be displayed on screen, paper, or in other media. CSS can be added to HTML elements in 3 ways: Inline - by using the style attribute in HTML elements Internal - by using a <style> element in the <head> section External - by using an external CSS file Inline CSS An inline CSS is used to apply a unique style to a single HTML element and uses the style attribute of an HTML element. Example: <!DOCTYPE html> <html> <body> <h1 style="color:blue;">This is a red Heading</h1> </body> </html> Result in browser: This is a Blue Heading Internal CSS The internal style sheet is used to add a unique style for a single document. It is defined in <head> section of the HTML page inside the <style> tag. ... With Internal style sheets, you can style the visited, hover, active, and link color of an anchor tag. But in the Internal CSS, we can not control styles for multiple documents at once. Internal style Sheet is applicable to the Page in which it is included. Internal Style Sheet is used to style individual page. It’s impossible to style "pseudo-elements" and classes with inline styles. With Internal style sheets, you can style the visited, hover, active, and link color of an anchor tag.
    [Show full text]
  • Automated Extraction of Mixins in Cascading Style Sheets Alan Charpentier, Jean-Rémy Falleri, Laurent Réveillère
    Automated Extraction of Mixins in Cascading Style Sheets Alan Charpentier, Jean-Rémy Falleri, Laurent Réveillère To cite this version: Alan Charpentier, Jean-Rémy Falleri, Laurent Réveillère. Automated Extraction of Mixins in Cas- cading Style Sheets. 32rd IEEE International Conference on Software Maintenance and Evolution (ICSME), Oct 2016, Raleigh, United States. pp.56-66, 10.1109/ICSME.2016.15. hal-02182065 HAL Id: hal-02182065 https://hal.archives-ouvertes.fr/hal-02182065 Submitted on 6 Jan 2020 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Automated Extraction of Mixins in Cascading Style Sheets Alan Charpentier, Jean-Rémy Falleri and Laurent Réveillère University of Bordeaux LaBRI, UMR 5800 F-33400, Talence, France Email: {acharpen,falleri,reveillere}@labri.fr Abstract—Cascading style sheets (CSS) is a language that projects such as Bootstrap3 and Foundation4, the two most describes the presentation of web documents. CSS is widely popular CSS frameworks. However, many applications still adopted in web development and it is now common for web rely on low level CSS code. A recent survey5 with more than projects to have several thousands of CSS lines of code. Because the language lacks advanced features to allow code reuse, several 13; 000 responses from web developers showed that almost languages such as Sass and Less have emerged as extensions to half of them do not use CSS preprocessors.
    [Show full text]
  • Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification W3C First Public Working Draft 12 April 2016
    Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification W3C First Public Working Draft 12 April 2016 This version: http://www.w3.org/TR/2016/WD-CSS22-20160412/ Latest version: http://www.w3.org/TR/CSS22/ Latest CSS level 2: http://www.w3.org/TR/CSS2/ Latest CSS: http://www.w3.org/TR/CSS/ Editors' draft: http://dev.w3.org/csswg/css2/ Editors: Bert Bos <BERT @w3.org> Former editors: Tantek Çelik <TANTEK @cs.stanford.edu> Ian Hickson <IAN @hixie.ch> Håkon Wium Lie <HOWCOME @opera.com> Chris Lilley <CHRIS @w3.org> Ian Jacobs <IJ @w3.org This document is also available in these non-normative formats: plain text p.0, gzip'ed tar file p.0, ZIP FILEp.0, gzip'ed PostScript p.0, PDFp.0. See also translations. Copyright © 2016 W3C® (MIT, ERCIM, Keio, Beihang). W3C LIABILITY, TRADEMARK AND document use rules apply. Abstract This specification defines Cascading Style Sheets level 2. CSS is a style sheet language that allows au- thors and users to attach style (e.g., fonts and spacing) to structured documents (e.g., HTML documents and XML applications). By separating the presentation style of documents from the content of documents, CSS simplifies Web authoring and site maintenance. CSS 2.2 is the second revision of CSS level 2 [CSS2]p.363. It corrects a few errors in CSS 2.1, the first revision of CSS level 2. It is not the latest version of CSS. See the "CSS Snapshot" [CSS]p.363 for an overview of specifications that make up the whole of CSS.
    [Show full text]
  • Synchronized Multimedia Integration Language (SMIL) Boston Specification
    Synchronized Multimedia Integration Language (SMIL) Boston Specification Synchronized Multimedia Integration Language (SMIL) Boston Specification W3C Working Draft 25 February 2000 This version: http://www.w3.org/TR/2000/WD-smil-boston-20000225 (Other formats: single PostScript file, single PDF file, zip archive) Latest version: http://www.w3.org/TR/smil-boston Previous version: http://www.w3.org/TR/1999/WD-smil-boston-19991115 Editors: Jeff Ayars (RealNetworks), Dick Bulterman (Oratrix), Aaron Cohen (Intel), Erik Hodge (RealNetworks), Philipp Hoschka (W3C), Eric Hyche (RealNetworks), Ken Day (Macromedia), Kenichi Kubota (Panasonic), Rob Lanphier (RealNetworks), Nabil Layaïda (INRIA), Philippe Le Hégaret (W3C), Thierry Michel (W3C), Jacco van Ossenbruggen (CWI), Lloyd Rutledge (CWI), Bridie Saccocio (RealNetworks), Patrick Schmitz (Microsoft), Warner ten Kate (Philips), Ted Wugofski (Gateway). Copyright ©2000 W3C® (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Abstract This document specifies the "Boston" version of the Synchronized Multimedia Integration Language (SMIL, pronounced "smile"). SMIL Boston has the following two design goals: Define a simple XML-based language that allows authors to write interactive multimedia presentations. Using SMIL Boston, an author can describe the temporal behavior of a multimedia presentation, associate hyperlinks with media objects and describe the layout of the presentation on a screen. Allow reusing of SMIL syntax and semantics in other XML-based languages, in particular those who need to represent timing and synchronization. For example, SMIL Boston components should be used for integrating timing into XHTML [XHTML10]. 1 24 Feb 2000 08:26 Synchronized Multimedia Integration Language (SMIL) Boston Specification Status of this document This section describes the status of this document at the time of its publication.
    [Show full text]
  • Design and Implementation of MEARN Stack-Based Real-Time Digital Signage System
    Journal of Korea Multimedia Society Vol. 20, No. 5, May 2017(pp. 808-826) https://doi.org/10.9717/kmms.2017.20.5.808 Design and Implementation of MEARN Stack-based Real-time Digital Signage System Trinh Duy Khue†, Thanh Binh Nguyen††, UkJIn Jang†, Chanbin Kim†, Sun-Tae Chung††† ABSTRACT Most of conventional DSS’s(Digital Signage Systems) have been built based on LAMP framework. Recent researches have shown that MEAN or MERN stack framework is simpler, more flexible, faster and more suitable for web-based application than LAMP stack framework. In this paper, we propose a design and implementation of MEARN (ME(A+R)N) stack-based real-time digital signage system, MR-DSS, which supports handing real-time tasks like urgent/instant messaging, system status monitoring and so on, efficiently in addition to conventional digital signage CMS service tasks. MR- DSCMS, CMS of MR-DSS, is designed to provide most of its normal services by REST APIs and real- time services like urgent/instant messaging by Socket.IO base under MEARN stack environment. In addition to architecture description of components composing MR-DSS, design and implementation issues are clarified in more detail. Through experimental testing, it is shown that 1) MR-DSS works functionally well, 2) the networking load performance of MR-DSCMS’s REST APIs is better compared to a well-known open source Xibo CMS, and 3) real-time messaging via Socket.IO works much faster than REST APIs. Key words: Digital Signage System, Content Management System, Real-time Web Service, MEAN Stack, MERN Stack, REST API, Socket.IO 1.
    [Show full text]
  • Preview CSS Tutorial (PDF Version)
    About the Tutorial CSS is used to control the style of a web document in a simple and easy way. CSS stands for Cascading Style Sheets. This tutorial covers both the versions CSS1 and CSS2 and gives a complete understanding of CSS, starting from its basics to advanced concepts. Audience This tutorial will help both students as well as professionals who want to make their websites or personal blogs more attractive. Prerequisites You should be familiar with: Basic word processing using any text editor. How to create directories and files. How to navigate through different directories. Internet browsing using popular browsers like Internet Explorer or Firefox. Developing simple Web Pages using HTML or XHTML. If you are new to HTML and XHTML, then we would suggest you to go through our HTML Tutorial or XHTML Tutorial first. Copyright & Disclaimer Copyright 2017 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected] i Table of Contents About the Tutorial ....................................................................................................................................
    [Show full text]
  • Reasoning with Style
    Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence (IJCAI 2015) Reasoning with Style Mart´ı Bosch∗ y z Pierre Geneves` y z Nabil Laya¨ıday z ∗ Universitat Politecnica` de Catalunya y CNRS, LIG z Inria Abstract Mesbah and Mirshokraie, 2012]. The simplicity of CSS syn- tax may be misleading as it hides the complexity of its most The Cascading Style Sheets (CSS) language constitutes a key advanced aspects. For this reason, developers increasingly component of web applications. It offers a series of sophis- rely on frameworks that automatically generate CSS files. ticated features to stylize web pages. Its apparent simplicity This often results in a code that is very hard to maintain. This and power are however counter-balanced by the difficulty of also leads to redundant declarations and inaccessible selec- debugging and maintaining style sheets, tasks for which de- tors, that unnecessarily increase resources required to transfer velopers still lack appropriate tools. In particular, significant the CSS files (and therefore web traffic at a global scale) and portions of CSS code become either useless or redundant, and to process the page layout. Previous studies [Meyerovich and tend to accumulate over time. The situation becomes even Bodik, 2010] showed that the visual layout of web pages con- worse as more complex features are added to the CSS lan- sumes 40–70% of the processing time of the browser. Simpli- guage (e.g. CSS3 powerful selectors). A direct consequence fying CSS code is essential in reducing this cost. Current syn- is a waste of CPU that is required to display web pages, as tax optimizers1 perform only syntactic analyses, and are un- well as the significant amount of useless traffic at web scale.
    [Show full text]
  • CSS Preprocessing: Tools and Automation Techniques | HTML
    07/11/2019 Information | Free Full-Text | CSS Preprocessing: Tools and Automation Techniques | HTML Information 2018, 9(1), 17; https://doi.org/10.3390/info9010017 Article CSS Preprocessing: Tools and Automation Techniques † by Ricardo Queirós CRACS/INESC TEC and School of Media Arts and Design, Polytechnic of Porto, Rua D. Sancho I, n.° 981, 4480-876 Vila do Conde, Portugal † This paper is an extended version of our paper published in the 6th Symposium on Languages, Applications and Technologies (SLATE 2017), Porto, Portugal, 26–27 June 2017. Scientific Repository of the Polytechnic Institute of Porto Received: 12 Nprovidedo by vember 2017 / Accepted: 10 January 2018 / Published: 12 January 2018 View metadata, citation and similar papers at core.ac.uk CORE brought to you by Abstract: Cascading Style Sheets (CSS) is a W3C specification for a style sheet language used for describing the presentation of a document written in a markup language, more precisely, for styling Web documents. However, in the last few years, the landscape for CSS development has changed dramatically with the appearance of several languages and tools aiming to help developers build clean, modular and performance-aware CSS. These new approaches give developers mechanisms to preprocess CSS rules through the use of programming constructs, defined as CSS preprocessors, with the ultimate goal to bring those missing constructs to the CSS realm and to foster stylesheets structured programming. At the same time, a new set of tools appeared, defined as postprocessors, for extension and automation purposes covering a broad set of features ranging from identifying unused and duplicate code to applying vendor prefixes.
    [Show full text]
  • COMS W4115 Project Proposal Csslang
    COMS W4115 Project Proposal CSSLang Wayne Yang [email protected] June 6, 2010 1 Introduction In the past few years, there has been a growing trend of building web sites that comply with web standards to ensure greater accessibility, usability, and interoperability of web pages. These web standards commonly refer to Hypertex Markup Language (HTML), Cascading Style Sheets (CSS), and ECMAScript (or Javascript). CSS is a style sheet language primarily used to describe the presentations of web pages [1]. It enables the separation of presentation from the semantic or structure of web pages and allows web designers to reuse style sheets across web pages [2]. Throughout this document, the term "CSS" refers to the the CSS Level 2 Revision 1 (CSS 2.1) specification by W3C. Although CSS can also be ap- plied to XML documents, this project focuses on CSS in the HTML context. This project is to design a language CSSLang that adds features typically seen in programming languages to CSS. 2 Motivations Currently, CSS has no notion of variables which makes it diffcult for users to reuse style properties or create CSS rule sets that have parameterized property values. For example, to specify similar border and margin style for two class selectors header and footer, one has to duplicate style properties with slight variations in values: 1 #header { border-width: 1px; margin-width: 1px; } #footer { border-width: 5px; margin-width: 5px; } In addition, CSS lacks support for expressions in the property value such as the following: #header { border-width: 5px + 3em; } Inpsired by LESS and Sass which attempts to address these shortcomings of CSS, CSSLang implements some of the features and syntax of these lan- guages.
    [Show full text]