Você está na página 1de 5

FORMATOS:

<!DOCTYPE html> <b></b>


<html></html> <em></em>
<body></body> <i></i>
<h1>TEXTO</h1> --> h6 <small></small>
<p>TEXTO</p> <strong></strong>
<a href="link">TEXTO</a> <sub></sub>
<img src="ej.jpg" alt="TEXTO" width="104" height="142"> <sup></sup>
<br></br> <ins></ins>
<hr> <del></del>
HTML Styles - CSS <mark></mark>
<!DOCTYPE html> <code></code>
<html> <kbd></kbd>
<body> <samp></samp>
<div style="opacity:0.5;position:absolute;left:50px;width: <var></var>
300px;height:150px;background-color:#40B3DF;"></div> <pre></pre>
<div style="font-family:verdana;padding:20px;border-radius: <abbr></abbr>
10px;border:10px solid #EE872A;"> <address></address>
<div style="opacity:0.3;position:absolute;left:120px;width: <bdo></bdo>
100px;height:200px;background-color:#8AC007;"></div> <q></q>
<h3>Look! Styles and colors</h3> <cite></cite>
<div style="letter-spacing:12px;">Manipulate Text</div> <dfn></dfn>
<div style="color:#40B3DF;">Colors <span style="background-color:
#B4009E;color:#ffffff;">Boxes</span></div>
<div style="color:#000000;">and more...</div>
</div>
</body>
</html>
HTML Style Example - Background Color
<!DOCTYPE html>
<html>
<body style="background-color:yellow;">
<h2 style="background-color:red;">This is a heading</h2>
<p style="background-color:green;">This is a paragraph.</p>
</body>
</html>
HTML Style Example - Font, Color and Size
<!DOCTYPE html>
<html>
<body>
<h1 style="font-family:verdana;">A heading</h1>
<p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p>
</body>
</html>
HTML Head
HTML <head> Tag: HTML <base> Tag
<html> <head>
<head> <base href="http://www.w3schools.com/images/
<title>Title of the document</title> " target="_blank">
</head> </head>
<body> <body>
The content of the document...... <img src="stickman.gif" width="24" height=
</body> "39" alt="Stickman">
</html> <a href="http://www.w3schools.com">
HTML <title> Tag W3Schools</a>
<html> </body>
<head> HTML <link> Tag
<title>HTML Reference</title> <head>
</head> <link rel="stylesheet" type="text/css" href=
<body> theme.css>
The content of the document...... </head>
</body> HTML <script> Tag
</html> <script>
HTML <meta> Tag document.getElementById("demo").innerHTML =
<head> Hello JavaScript!;
<meta charset="UTF-8"> </script>
<meta name="description" content="Free Web tutorials"> HTML <style> Tag
<meta name="keywords" content="HTML,CSS,XML,JavaScript"> <html>
<meta name="author" content="Hege Refsnes"> <head>
</head> <style>
HTML Style Example - Text Alignment h1 {color:red;}
<!DOCTYPE html> p {color:blue;}
<html> </style>
<body> </head>
<h1 style="text-align:center;">Center-aligned heading</h1> <body>
<p>This is a paragraph.</p> <h1>A heading</h1>
</body> <p>A paragraph.</p>
</html> </body>
HTML <img> Tag </html>
<img src="smiley.gif" alt="Smiley face" height="42" width="42">
HTML <map> Tag
<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
HTML <area> Tag
<img src="planets.gif" width="145" height="126" alt="Planets"
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
HTML Tables An HTML Table with a Border Attribute
<table style="width:300px"> <table border="1" style="width:300px">
<tr> <tr>
<td>Jill</td> <td>Jill</td>
<td>Smith</td> <td>Smith</td>
<td>50</td> <td>50</td>
</tr> </tr>
<tr> <tr>
<td>Eve</td> <td>Eve</td>
<td>Jackson</td> <td>Jackson</td>
<td>94</td> <td>94</td>
</tr> </tr>
</table> </table>
STYLE DENTRO DEL HEAD: An HTML Table with Collapsed Borders
<style> <style> <style>
table,th,td table,th,td th,td
{ { {
border:1px solid black; border:1px solid black; padding:15px;
} border-collapse:collapse }
</style> } </style>
HTML Table Headings </style>
<table style="width:300px">
<tr> <style> <style>
<th>Firstname</th> table,th,td table, th, td
<th>Lastname</th> { {
<th>Points</th> border:1px solid black; border:1px solid black;
</tr> border-collapse:collapse; padding:5px;
<tr> } }
<td>Eve</td> th,td table
<td>Jackson</td> { {
<td>94</td> padding:5px; border-spacing:15px;
</tr> } }
</table> th </style>
{ </head>
text-align:left;
}
</style>
</head>
HTML Lists
HTML <ol> Tag HTML <ul> Tag HTML <dl> Tag HTML <li> Tag
<ol> <ul> <dl> <ol>
<li>Coffee</li> <li>Coffee</li> <dt>Coffee</dt> <li>Coffee</li>
<li>Tea</li> <li>Tea</li> <dd>Black hot drink</dd> <li>Tea</li>
<li>Milk</li> <li>Milk</li> <dt>Milk</dt> <li>Milk</li>
</ol> </ul> <dd>White cold drink</dd> </ol>
</dl>
<ol start="50"> HTML <span> Tag <ul>
<li>Coffee</li> <p>My mother has <span style= <li>Coffee</li>
<li>Tea</li> color:blue>blue</span> eyes.</p> <li>Tea</li>
<li>Milk</li> <li>Milk</li>
</ol> </ul>
HTML Blocks
HTML <div> Tag
<div style="color:#0000FF">
<h3>This is a heading</h3>
<p>This is a paragraph.</p>
</div>
HTML Layouts
<!DOCTYPE html>
<html>
<body>
<div id="container" style="width:500px">
<div id="header" style="background-color:#FFA500;">
<h1 style="margin-bottom:0;">Main Title of Web Page</h1></div>
<div id="menu" style="background-color:#FFD700;height:200px;width:100px;float:left;">
<b>Menu</b><br>
HTML<br>
CSS<br>
JavaScript</div>
<div id="content" style="background-color:#EEEEEE;height:200px;width:400px;float:left;">
Content goes here</div>
<div id="footer" style="background-color:#FFA500;clear:both;text-align:center;">
Copyright W3Schools.com</div>
</div>
</body>
</html>
HTML Forms and Input
Create text fields
<!DOCTYPE html>
<html>
<body>
<form action="">
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
</form>
<p><b>Note:</b> The form itself is not visible.
Also note that the default width of a text field is 20 characters.</p>
</body>
</html>
Create password field
<!DOCTYPE html>
<html>
<body>
<form action="">
Username: <input type="text" name="user"><br>
Password: <input type="password" name="password">
</form>
<p><b>Note:</b> The characters in a password field
are masked (shown as asterisks or circles).</p>
</body>
</html>

Você também pode gostar