Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a css rule has two parts - selector i.e. h1 ; declaration { color: red } in html. in order. element names are case-insensitive, h1, H1, same difference.
- Declaration also has two parts. - property name, i.e. color, and property value, i.e. red.
- css rule
- selector h1
- declaration color red
- color red = declaration
- color = property red = value.
- both the declaration and the css rule have two parts.
- It goes in the head tag, after the title tag.
- you can create many style sheets, and they will be combined and loaded upon presentation, html goes in order, therefor it's unwise to start with the presentation,you should write the html first. and before that, the actual guts.
- it starts with <style type="text/css"> fallowed by the element, and in some instances, i've even seen the value "input being used.".
- and variations on the { } tags.
- i.e.
- <style type="text/css">
- h1 {
- color:red;
- margin:right; margin:bottom; margin:top; margin:left;
- align
- border
- size
- font
- h1 through h6
- div tag id's.
- div tag classes.
- y/n?
- It's best to Link the stylesheet
- <LINK rel="stylesheet"> for instance
- how this works... :
- mymathforums, physics forums, chemical forums, mathhelpforums, stackoverflow, w3fools, indiana university, cambridge university, lewis university, CSI CCC, all seem reliable resources.
- >quackit? w3schools?
- <script type="text/javascript"> <goes before or in head>
- <style type="text/css"> <in the head>
- ----------------------------------------------------
- <html>
- <div id="ID"></div>
- <script type="text/javascript">
- document.getElementById('ID').innerHTML = "HELLO";
- </script>
- </html>
- <html>
- <script type="text/javascript">
- document.getElementById('ID').innerHTML = "HELLO";
- </script>
- <div id="ID"></div>
- </html>
- HTML is executed in order, therefor the second one executes the script before the div has loaded. Do this if you want to open the script right away.
- --------------------------------------------------------------------
- EDIT: If you want the JS to run after the page has loaded use window.onload or document.body.onload or
- <body onload="...">
- Alternatively if you're using a JS library such as jQuery, you can use
- $(document).ready(function() {
- ...
- });
- info on meta tags:... such as google analytics meta tags? putting google cookies on your page.
Advertisement
Add Comment
Please, Sign In to add comment