JavaScript in 24 Hours, Sams Teach Yourself, 6/e by Phil Ballard


JavaScript in 24 Hours, Sams Teach Yourself, 6/e by Phil Ballard

Author:Phil Ballard [Ballard, Phil]
Language: eng
Format: azw3
Publisher: Sams Publishing
Published: 2015-06-16T04:00:00+00:00


Where to Place Style Declarations

Somewhat similarly to JavaScript statements, CSS style declarations can either appear within the page or be saved in an external file and referenced from within the HTML page.

To reference an external stylesheet, normal practice is to add a line to the page <head> like this:

Click here to view code image

<link rel="stylesheet" type="text/css" href="style.css" />

Alternatively, you can place style declarations directly in the <head> of your page between <style> and </style> tags:

<style>

p {

color: black;

font-family: tahoma;

}

h1 {

color: blue;

font-size: 22pt;

}

</style>

Finally, it’s possible to add style declarations directly into an HTML element by using the style attribute:

Click here to view code image

<p style="color:red; font-size: 12px;">Please see our terms of service.</p>



Loading...
Download

JavaScript in 24 Hours, Sams Teach Yourself, 6/e by Phil Ballard.azw3



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.