-
Book Overview & Buying
-
Table Of Contents
HTML5 Data and Services Cookbook
We have already used on several occasions Data URI (Uniform resource identifier) throughout this book, but never got into details on what can we use it for as well as what are the limitations. Data URI are often referred to as Data URL (Uniform Resource Locator) though technically speaking they don't actually locate anything from a remote site.
In this example, we will use different media types and check the size constraints.
We will only need browser and some sample text files for this example. The files can be downloaded as part of the files folder in the example files.
In order to see some of the options available we will create a simple HTML file with few different use scenarios:
The head section will include the example.css file:
<head> <title>Data URI example</title> <link rel="stylesheet" type="text/css" href="example.css"> </head>
In the body section we add a div element that will serve as a container for the CSS image...
Change the font size
Change margin width
Change background colour