CSS - Cascading Style Sheets

Total Page:16

File Type:pdf, Size:1020Kb

CSS - Cascading Style Sheets ITIY3 Introduction to Web Publishing CSS - Cascading Style Sheets As a W3C standard, CSS provides a powerful mechanism for defining the presentation of elements in web pages. With CSS style rules, you can instruct the web browser to render page content. With conditional rules, layout may even adapt to different environments and software solutions. Features like the viewport’s size may be quite different in desktop and mobile environments. Mobile web browsers have user interfaces and interactive features that differ from the typical desktop schemes. All these differences can be taken into consideration when designing web pages. With CSS as a separate presentation layer, you can alter the layout of a document and its elements without changing the structural layer created with HTML markup. There may be no need to alter the hierarchical and semantical structure of the document to adapt styling solutions, so presentation and structure may be kept separate. One of the great advantages of CSS lies in the possibility to centrally control the styles of multiple documents in a web site. The same set of style rules may apply to all documents or a selected set of documents within a site. At the document level, you can add styles to selected element types, specific parts of the document (element groups), and even to single elements if needed. https://www.w3.org/standards/webdesign/htmlcss#whatcss https://www.w3.org/Style/CSS/ https://www.w3.org/standards/techs/css#w3c_all Online example demonstrating CSS: An example site intended as a demonstration of what can be accomplished through CSS-based design. The same HTML-document is redesigned using only CSS rules and design specific graphics. Read the description on the page, check the designs and inspect HTML and CSS code examples from the pages: http://www.csszengarden.com/ University of Tampere, COMS 1 ITIY3 Introduction to Web Publishing CSS versions CSS standards exist in different versions and development stages (levels): CSS level1 (CSS1), CSS level2 (CSS2), CSS2.1 revision and 2.2 revision on the way. CSS versions 1 define a complete collection of definition rules and level 2 extends it further with its revisions. However, development of different parts of the standards may have different developmental stages (levels) which form independent modules which are published piece by piece instead of always providing one single complex recommendation (like CSS1 & 2). Modules can be and are developed, tested, and adapted individually making the working progress faster (also faster support by browser software is a result). Modules in level 3 (and even 4), often referred as CSS3, bring new rules that can be incorporated to newer versions of CSS (e.g. the next revision CSS 2.2). https://www.w3.org/TR/2016/WD-CSS22-20160412/about.html#css2.2-v-css2 To be more up to date with the current CSS status, the W3C also issues “Snapshots” which give more information to implementers than actual CSS authors. Web browser support for CSS3 modules may have full or only partial support, or experimental level support with different browser specific (vendor) prefixes for different web browsers. Snapshot 2017 - https://www.w3.org/TR/css-2017/ Introduction and background process - https://www.w3.org/TR/css-2017/#intro CSS levels - https://www.w3.org/TR/css-2017/#css-levels CSS 3 module example – CSS Color Module Level 3 (extending the part of CSS2.1 version that is about color definitions) - https://www.w3.org/TR/2011/REC-css3-color-20110607/ Styles affecting presentation of HTML documents Web browsers apply inbuilt default styles for all opened web documents with HTML markup – the collection of default browser styles is referred as User Agent Stylesheet. We have seen examples of this in the previous exercises with HTML elements. Default styles vary with web browser types and versions. There are some general guidelines and W3C recommendations how elements should be displayed by default, usually suggesting features suited for the elements’ meaning. Differing interpretations are somewhat common, especially for mobile browser implementations. The user may alter some of the default browser styles. Browser settings offer certain basic options to choose from e.g. font size and font family. Some browsers allow the usage of additional customized user designed style sheets that may override default browser styles and if required even author style sheets. Both browser default and user defined styles may be replaced by the web page designers with CSS style definitions (author styles) added to the web pages. Author style rules can be added as element styles affecting a single element, as document specific styles defined in the HTML document, and as site-specific styles with linked external style documents. The external style documents can be linked to any desired HTML document, which makes maintaining layout easier for multiple documents or for the entire site. All three methods can be used for adding styles to the same document. The added style rules have an increasing specificity (weight, rule strength) in affecting web page layout. The linked styles are the least specific and the element-styles are the most specific. More specific rules override less specific rules if they define overlapping styles for a selected element. Similarly, browser default styles are less specific than document specific styles added by the author. Site-wide external rules can be overridden with document specific rules e.g. to create exceptions to general rules. Both of these can be overridden at the level of individual elements with element styles. All these form a hierarchy of styles. University of Tampere, COMS 2 ITIY3 Introduction to Web Publishing Defining style rules - syntax Style rules are added using specific syntax. CSS syntax is different from HTML syntax. To apply presentational styles, you must first specify what element or elements of the document will be affected by the style rules. You must also define which presentational features to change? How to change them? For the selection of elements, CSS selectors are used. The selector is followed by a declaration which elaborates the property (or properties, features) to change, and what values should be used to change them. selector { property: value; } A simple example: h1 { color: blue; } when added to a document within the STYLE element (document specific style), the rule means that for any h1 element defined in the document, the text color is set to blue! h1 = selector for all h1 elements in the document, selecting the element type “h1” { } = marking the declaration of the styles color = property which defines text color in the selected element : (colon) = compulsory separator blue = value that corresponds to a specific color value that is used for the selected property (here text color) ; (semi-colon) = marks the end of property / value pair, acts as a separator Do not confuse properties in CSS styles with attributes in HTML elements!!! selector { property: value; } The selector in the example is an element type selector – a simple selector that selects all occurrences of the specified HTML element type in a document. h1 { color: blue; } – selects all H1 headings in the document, text color is changed to blue University of Tampere, COMS 3 ITIY3 Introduction to Web Publishing Changing the selector applies the style to another element: p { color: blue; } – changing text color to blue for all paragraphs You can also group selectors to apply the same declaration to multiple elements: h1,p { color: blue; } The separator is a comma (,) between selectors! Here, all the occurrences of H1 and P elements are selected. There may also be more than just one property-value pair in a declaration – here an example of adding color and font weight to the text of the selected element: h1 { color: blue; font-weight: normal; } The separator is a semicolon (;) is a must between property/ value pairs. You may make the rules more transparent and legible if you have multiple property / value pairs in a declaration. h1,h2 { color: red; font-size: 18px; text-transform: uppercase; } You can also place each new property on a separate line: h1,h2 { color: red; font-size: 18px; text-transform: uppercase; } In the above example, the rule selects all h1 and h2 elements in the document. color: red = all text in the both elements is red (black default) font-size: 18px = changing font size to 18 pixels (smaller then default) text-transform: uppercase = transforms all characters to uppercase University of Tampere, COMS 4 ITIY3 Introduction to Web Publishing Adding CSS to HTML documents As described above, you can define styles as element-styles, document specific styles and linked external styles. The style syntax is the same for these (selector and declaration), except for the element-styles, which do not need a separate selector as these are added straight to HTML elements. Inline element-styles with the style attribute Style rules can be added to individual elements using the HTML style attribute. syntax: <element style=”property: value”>…</element> The value of the style attribute must be a valid style declaration (property/value). No selectors needed since the affected element is selected by defining the style attribute in the element itself. Style declaration contains property definitions and value for these. There may be multiple property / value pairs as a value for a style attribute. If multiple properties are present, a semicolon (;) is used as separator! <element style=”property:value; property:value”>…</element> <h1 style=”color:red; font-weight:normal”>…</h1> The above is yielding the text in that particular h1 element rendered in red and without the default bold typeface in the heading. Note that inline element-style rules for a property will have high specificity (weight). This means that any style rules for that specific property, if defined at the document level or as linked styles, will be ignored.
Recommended publications
  • Rdfa in XHTML: Syntax and Processing Rdfa in XHTML: Syntax and Processing
    RDFa in XHTML: Syntax and Processing RDFa in XHTML: Syntax and Processing RDFa in XHTML: Syntax and Processing A collection of attributes and processing rules for extending XHTML to support RDF W3C Recommendation 14 October 2008 This version: http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014 Latest version: http://www.w3.org/TR/rdfa-syntax Previous version: http://www.w3.org/TR/2008/PR-rdfa-syntax-20080904 Diff from previous version: rdfa-syntax-diff.html Editors: Ben Adida, Creative Commons [email protected] Mark Birbeck, webBackplane [email protected] Shane McCarron, Applied Testing and Technology, Inc. [email protected] Steven Pemberton, CWI Please refer to the errata for this document, which may include some normative corrections. This document is also available in these non-normative formats: PostScript version, PDF version, ZIP archive, and Gzip’d TAR archive. The English version of this specification is the only normative version. Non-normative translations may also be available. Copyright © 2007-2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply. Abstract The current Web is primarily made up of an enormous number of documents that have been created using HTML. These documents contain significant amounts of structured data, which is largely unavailable to tools and applications. When publishers can express this data more completely, and when tools can read it, a new world of user functionality becomes available, letting users transfer structured data between applications and web sites, and allowing browsing applications to improve the user experience: an event on a web page can be directly imported - 1 - How to Read this Document RDFa in XHTML: Syntax and Processing into a user’s desktop calendar; a license on a document can be detected so that users can be informed of their rights automatically; a photo’s creator, camera setting information, resolution, location and topic can be published as easily as the original photo itself, enabling structured search and sharing.
    [Show full text]
  • HTML5 Favorite Twitter Searches App Browser-Based Mobile Apps with HTML5, CSS3, Javascript and Web Storage
    Androidfp_19.fm Page 1 Friday, May 18, 2012 10:32 AM 19 HTML5 Favorite Twitter Searches App Browser-Based Mobile Apps with HTML5, CSS3, JavaScript and Web Storage Objectives In this chapter you’ll: ■ Implement a web-based version of the Favorite Twitter Searches app from Chapter 5. ■ Use HTML5 and CSS3 to implement the interface of a web app. ■ Use JavaScript to implement the logic of a web app. ■ Use HTML5’s Web Storage APIs to store key-value pairs of data that persist between executions of a web app. ■ Use a CSS reset to remove all browser specific HTML- element formatting before styling an HTML document’s elements. ■ Save a shortcut for a web app to your device’s home screen so you can easily launch a web app. = DRAFT: © Copyright 1992–2012 by Deitel & Associates, Inc. All Rights Reserved. Androidfp_19.fm Page 2 Friday, May 18, 2012 10:32 AM 2 Chapter 19 HTML5 Favorite Twitter Searches App 19.1 Introduction 19.5 Building the App 19.2 Test-Driving the Favorite Twitter 19.5.1 HTML5 Document Searches App 19.5.2 CSS 19.5.3 JavaScript 19.3 Technologies Overview Outline 19.6 Wrap-Up 19.1 Introduction The Favorite Twitter Searches app from Chapter 5 allowed users to save their favorite Twit- ter search strings with easy-to-remember, user-chosen, short tag names. Users could then conveniently follow tweets on their favorite topics. In this chapter, we reimplement the Fa- vorite Twitter Searches app as a web app, using HTML5, CSS3 and JavaScript.
    [Show full text]
  • An Investigation Into World Wide Web Publishing with the Hypertext Markup Language Eric Joseph Cohen
    Rochester Institute of Technology RIT Scholar Works Theses Thesis/Dissertation Collections 11-1-1995 An Investigation into world wide web publishing with the hypertext markup language Eric Joseph Cohen Follow this and additional works at: http://scholarworks.rit.edu/theses Recommended Citation Cohen, Eric Joseph, "An Investigation into world wide web publishing with the hypertext markup language" (1995). Thesis. Rochester Institute of Technology. Accessed from This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact [email protected]. An Investigation into World Wide Web Publishing with the Hypertext Markup Language by Eric Joseph Cohen A thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in the School of Printing Management and Sciences in the College of Imaging Arts and Sciences of the Rochester Institute of Technology November 1995 Thesis Advisor: Professor Frank Romano School of Printing Management and Sciences Rochester Institute of Technology Rochester, New York Certificate of Approval Master1s Thesis This is to certify that the Master's Thesis of Eric joseph Cohen With a major in Graphic Arts Publishing has been approved by the Thesis Committee as satisfactory for the thesis requirement for the Master of Science degree at the convocation of November 1995 Thesis Committee: Frank Romano Thesis Advisor Marie Freckleton Graduate Program Coordinator C. Harold Goffin Director or Designate Title of Thesis: An Investigation into World Wide Web Publishing with the Hypertext Markup Language September 12, 1995 I, Eric Joseph Cohen, hereby grant permission to the Wallace Memorial Library of RIT to reproduce my thesis in whole or in part.
    [Show full text]
  • Multimedia Foundations Glossary of Terms Chapter 7 – Web Design
    Multimedia Foundations Glossary of Terms Chapter 7 – Web Design Absolute URL A path statement that includes the complete physical address of a file on the WWW, often beginning with the protocol http://. Alternative Text A short narrative description of a web-based image intended to convey the essence of its content for users with disabilities. ARPANET Advanced Research Projects Agency Network. The world’s first packet-switching network became operational in 1969. The predecessor of the global Internet. Attribute HTML syntax used to modify an HTML element (or tag). Usually occurs as a name-value pair, separated by "=". Background Image The image file source (usually a JPEG or GIF) that serves as the visual background for an HTML element. Block-Level Element HTML elements specifically designed to handle large chunks of information (e.g. paragraphs, lists, and list items). Body The main section of an HTML document containing information the user will see or code that directly affects its presentation. Browser Or Web browser. A software program designed for accessing HTML-based documents and presenting them on screen for viewing (e.g. Chrome, Internet Explorer, Firefox, and Safari). Button An object or widget in a graphical user interface that performs an action when selected by the user. Cascading Style Sheets (CSS) An external style sheet (a .css file) containing instructions for the physical appearance of HTML content on the screen. Character Reference Special character commands used in HTML that allow you to use symbols (a.k.a. glyphs) that are not part of the standard HTML character set, such as a copyright symbol © and quotation marks.
    [Show full text]
  • INF3580/4580 – Semantic Technologies – Spring 2016 Lecture 15: Rdfa
    INF3580/4580 { Semantic Technologies { Spring 2016 Lecture 15: RDFa Martin Giese 30th May 2016 Department of University of Informatics Oslo Repetition 18 June: Guest lecture, Lars Marius Garshol 25 May: no lecture (Whit Monday) 1st June is reserved for \Repetition" No fixed lecture material You, the students, say what you want to hear Let me know in time, so I'm prepared. Drop a mail to [email protected] until 18th May INF3580/4580 :: Spring 2016 Lecture 15 :: 30th May 2 / 29 Today's Plan 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2016 Lecture 15 :: 30th May 3 / 29 Reminder Outline 1 Reminder 2 Linking RDF to HTML 3 RDFa 4 Conclusion INF3580/4580 :: Spring 2016 Lecture 15 :: 30th May 4 / 29 FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds for instance dbpedia.org, dblp, and others In RDF files, downloadable with HTTP, FTP, etc. Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files As data model behind SPARQL query endpoints Embedded in HTML, as RDFa Reminder RDF on the Web RDF data exists in many forms: INF3580/4580 :: Spring 2016 Lecture 15 :: 30th May 5 / 29 for instance dbpedia.org, dblp, and others FOAF profiles data files from dbpedia.org, geonames, etc. In RSS 1.0 feeds Published using LOD principles (hash/slash namespaces) As metadata in PDF/A files As data model behind SPARQL query endpoints Embedded in HTML, as RDFa Reminder RDF on the Web RDF data exists in many forms: In RDF files, downloadable with HTTP, FTP, etc.
    [Show full text]
  • Chapter 10 Document Object Model and Dynamic HTML
    Chapter 10 Document Object Model and Dynamic HTML The term Dynamic HTML, often abbreviated as DHTML, refers to the technique of making Web pages dynamic by client-side scripting to manipulate the document content and presen- tation. Web pages can be made more lively, dynamic, or interactive by DHTML techniques. With DHTML you can prescribe actions triggered by browser events to make the page more lively and responsive. Such actions may alter the content and appearance of any parts of the page. The changes are fast and e±cient because they are made by the browser without having to network with any servers. Typically the client-side scripting is written in Javascript which is being standardized. Chapter 9 already introduced Javascript and basic techniques for making Web pages dynamic. Contrary to what the name may suggest, DHTML is not a markup language or a software tool. It is a technique to make dynamic Web pages via client-side programming. In the past, DHTML relies on browser/vendor speci¯c features to work. Making such pages work for all browsers requires much e®ort, testing, and unnecessarily long programs. Standardization e®orts at W3C and elsewhere are making it possible to write standard- based DHTML that work for all compliant browsers. Standard-based DHTML involves three aspects: 447 448 CHAPTER 10. DOCUMENT OBJECT MODEL AND DYNAMIC HTML Figure 10.1: DOM Compliant Browser Browser Javascript DOM API XHTML Document 1. Javascript|for cross-browser scripting (Chapter 9) 2. Cascading Style Sheets (CSS)|for style and presentation control (Chapter 6) 3. Document Object Model (DOM)|for a uniform programming interface to access and manipulate the Web page as a document When these three aspects are combined, you get the ability to program changes in Web pages in reaction to user or browser generated events, and therefore to make HTML pages more dynamic.
    [Show full text]
  • Preview HTML5 Tutorial
    HTML5 HTML5 About the Tutorial HTML5 is the latest and most enhanced version of HTML. Technically, HTML is not a programming language, but rather a markup language. In this tutorial, we will discuss the features of HTML5 and how to use it in practice. Audience This tutorial has been designed for beginners in HTML5 to make them understand the basic- to-advanced concepts of the subject. Prerequisites Before starting this tutorial, you should have a basic understanding of HTML and its tags. Disclaimer & Copyright Copyright 2016 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] HTML5 Execute HTML5 Online For most of the examples given in this tutorial you will find Try it option, so just make use of this option to execute your HTML5 programs at the spot and enjoy your learning. Try following example using Try it option available at the top right
    [Show full text]
  • Framework for Developing Offline HTML5 Applications
    MASARYK UNIVERSITY FACULTY}w¡¢£¤¥¦§¨ OF I !"#$%&'()+,-./012345<yA|NFORMATICS Framework for Developing Offline HTML5 Applications DIPLOMA THESIS Petr Kunc Brno, 2013 Declaration Hereby I declare, that this paper is my original authorial work, which I have worked out by my own. All sources, references and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Advisor: doc. RNDr. Tomás Pitner, PhD. ii Acknowledgement Above all, I would like to thank my advisor doc. RNDr. Tomáš Pitner, PhD. for leading not only this diploma thesis but also for leading me during my studies. I would also like to thank my colleagues in Laboratory of Software Architectures and Information Systems, especially Mgr. Filip Nguyen and Mgr. Daniel Tovarˇnákfor priceless advice on implementation and for providing their knowledge. Nevertheless, I would like to thank my colleagues in Celebrio Software company. iii Abstract The aim of this thesis is to provide detailed information about developing offline web ap- plications. The thesis presents important technologies in the development and mostly deals with Application cache technology. It summarizes advantages and also disadvantages and problems of the technology. Then, it offers solutions to some of the problems and introduces framework for build- ing offline web applications more sophisticatedly. At last, demonstration application is pre- sented which shows the benefits of proposed technology. iv Keywords HTML5, offline, web applications, application
    [Show full text]
  • HTML5 Microdata and Schema.Org
    HTML5 Microdata and Schema.org journal.code4lib.org/articles/6400 On June 2, 2011, Bing, Google, and Yahoo! announced the joint effort Schema.org. When the big search engines talk, Web site authors listen. This article is an introduction to Microdata and Schema.org. The first section describes what HTML5, Microdata and Schema.org are, and the problems they have been designed to solve. With this foundation in place section 2 provides a practical tutorial of how to use Microdata and Schema.org using a real life example from the cultural heritage sector. Along the way some tools for implementers will also be introduced. Issues with applying these technologies to cultural heritage materials will crop up along with opportunities to improve the situation. By Jason Ronallo Foundation HTML5 The HTML5 standard or (depending on who you ask) the HTML Living Standard has brought a lot of changes to Web authoring. Amongst all the buzz about HTML5 is a new semantic markup syntax called Microdata. HTML elements have semantics. For example, an ol element is an ordered list, and by default gets rendered with numbers for the list items. HTML5 provides new semantic elements like header , nav , article , aside , section and footer that allow more expressiveness for page authors. A bunch of div elements with various class names is no longer the only way to markup this content. These new HTML5 elements enable new tools and better services for the Web ecosystem. Browser plugins can more easily pull out the text of the article for a cleaner reading experience. Search engines can give more weight to the article content rather than the advertising in the sidebar.
    [Show full text]
  • XHTML+Rdfa 1.1 - Third Edition Table of Contents
    XHTML+RDFa 1.1 - Third Edition Table of Contents XHTML+RDFa 1.1 - Third Edition Support for RDFa via XHTML Modularization W3C Recommendation 17 March 2015 This version: http://www.w3.org/TR/2015/REC-xhtml-rdfa-20150317/ Latest published version: http://www.w3.org/TR/xhtml-rdfa/ Implementation report: http://www.w3.org/2010/02/rdfa/wiki/CR-ImplementationReport Previous version: http://www.w3.org/TR/2014/PER-xhtml-rdfa-20141216/ Previous Recommendation: http://www.w3.org/TR/2013/REC-xhtml-rdfa-20130822/ Editor: Shane McCarron, Applied Testing and Technology, Inc., [email protected] Please check the errata for any errors or issues reported since publication. This document is also available in these non-normative formats: XHTML+RDFa, Diff from Previous Recommendation, Postscript version, and PDF version The English version of this specification is the only normative version. Non-normative translations may also be available. Copyright © 2007-2015 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark and document use rules apply. Abstract RDFa Core 1.1 [RDFA-CORE [p.61] ] defines attributes and syntax for embedding semantic markup in Host Languages. This document defines one such Host Language. This language is a superset of XHTML 1.1 [XHTML11-2e [p.61] ], integrating the attributes as defined in RDFa Core 1.1. This document is intended for authors who want to create XHTML Family documents that embed rich semantic markup. - 1 - Status of This Document XHTML+RDFa 1.1 - Third Edition Status of This Document This section describes the status of this document at the time of its publication.
    [Show full text]
  • Html5 Multimedia
    HTML5 MULTIMEDIA TAMZ 1 Lab 9 Old Days of HTML Before HTML5, browsers could only natively display one type of multimedia – animated GIF <img src="omgcat.gif"> Later, plugins appeared 1991: Apple Quicktime (.mov) 1994: MIDI (background music) 1995: RealAudio (.ra, .ram) 1997: RealVideo (H.263) 1998: Windows Media Player 1999: Quicktime for Windows (.mov, .mp3, .mp4, .swf) 2002: Macromedia Shockwave Flash (.swf) <embed type="application/x-shockwave- flash" src="flash.swf"/> 2007: Microsoft Silverlight (flash, vid, etc.) HTML5 Multimedia In HTML5, you can embed audio or video using native HTML tags audio and video, and if the browser supports the tags, it will give users controls to play the file. No plugins needed Better performance Native, accessible controls The audio element is used for embedding an audio player inside a page for a particular audio file. <audio src="music.ogg" controls="true" preload="true"></audio> The video element embeds a video player for a particular video file. <video src="movie.ogv" controls width="390"></video> Multimedia Codecs Audio - An audio track is compressed, stored, and decoded according to a codec. The most relevant audio codecs are: MP3: Patent-encumbered. AAC (Advanced Audio Coding): Patent-encumbered. Used in Apple products. Ogg Vorbis: Free, open-source, patent-free Video file, like an ".avi" file, is really a container for multiple related files that describe a video, like video track, one or more audio tracks with synchronization markers and metadata (title, album art, etc). The most popular video containers are: MPEG4: .mp4, .m4v Ogg: .ogv WebM: .webm Audio Codec Browser Support There is no official codec for browsers to support Source : wikipedia.org Video Codec Browser Support Although the HTML5 specification initially mandated support for the Theora Ogg video codec, this requirement was dropped from the specification after it was challenged by Apple and Nokia.
    [Show full text]
  • Overview Common Tags HTML Basics Element Attributes
    CS50 HTML Overview Key Terms HyperText Markup Language, or HTML, is the language that describes the contents of • HTML web pages. It's not a programming language (it doesn't contain loops, if statements, • element etc.), but it does allow a web designer to decide how a web page is laid out. When a • tag user requests a web page, the web server will send the contents of that page in HTML. • DOM The web browser interprets this HTML and displays the web page to the user. • attribute HTML Basics To the right is a basic, sample HTML web page. The first line clarifies that the document is an HTML document (specifically, an HTML5 doc- <!DOCTYPE html> ument). After that, HTML code is organized as a series of nested ele- ments. Each element begins and ends with a tag that indicates what <html> type of element it is. Anything between those tags is the contents of <head> the element. In our example, the outermost element is the html element, <title>hello, world</title> </head> since it is enclosed with <html> at the start, and </html> at the very end. Everything in between those two tags is part of the html element. <body> Hello! </body> In general, opening tags will take the form <tagname> and closing tags </html> will take the form </tagname>. Inside of our html element are two other elements: head and body. The head element contains information about the webpage that isn't in the body of the web page itself. For instance, the head element here contains a title element, which sets the title of the webpage to hello, world.
    [Show full text]