HTML and CSS: Difference between revisions

From Wiki
Jump to navigation Jump to search
Line 14: Line 14:
     <body>Hello World!</body>
     <body>Hello World!</body>
</html>
</html>
</pre>
=== New tags ===
* For organizing: <code>main</code>, <code>header</code>, <code>section</code>, <code>footer</code>
* Navigation: <code>nav</code>
* Input types: <code>date</code>, <code>time</code>
=== Boolean attributes ===
Old style:
<pre>
<input type="option" checked="checked"/>
</pre>
new style:
<pre>
<input type="option" checked />  <!-- presence indicates true -->
</pre>
</pre>



Revision as of 17:32, 21 April 2015

How to make a link open up in a new browser window/tab:

<a href="www.google.com" target="_blank">Click here!</a>

HTML5

<!DOCTYPE html>
<html lang="en">
    <head>
    	<meta charset="utf-8">
    	<title>My Page</title>
    </head>
    <body>Hello World!</body>
</html>

New tags

  • For organizing: main, header, section, footer
  • Navigation: nav
  • Input types: date, time

Boolean attributes

Old style:

<input type="option" checked="checked"/>

new style:

<input type="option" checked />  <!-- presence indicates true -->

CSS

How to include an external CSS stylesheet:

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

How to build a menu from css:

http://www.ssi-developer.net/css/menu-rollover-effect_table.shtml

CSS reference

http://www.w3schools.com/css/css_reference.asp