<!DOCTYPE html> <!-- this declaration tells the browser that this is HTML5 -->
<html>
<!--
The head element may contain information for rendering
but is not, itself, rendered (displayed in page).
-->
<head>
metadata elements provide:
- a title displayed in browser tab
- information used by search engines
- links to JavaScript files
- links to CSS Style Sheets
<script>
local JavaScript code
</script>
<style>
local CSS style definitions
</style>
</head>
<!-- here is where rendering starts -->
<body>
content elements
</body>
</html>
| Attribute | Example | Applies to |
|---|---|---|
| id | <div id="placeholder"> ... </div> | all elements |
| style | <div style="height:1.5em; width:10em; background-color:cornsilk;"</div> | all elements |
| title | title="hover over me to see tooltip" | all elements |
| href: | <a href="cse686L2.htm">this page</a> | anchors |
| target | <a href="cse686L2.htm" target="_blank">this page in another tab</a> | anchors |
| src and alt | <img src="campus-strip.jpg" alt="view of quad"> | images |
| height and width | <img src="campus-strip.jpg" height="200" width="1200"> | all block elements |
| lang | <html lang="en-US"> ... </html> | html element |
| There are more element specific attributes. Consult Dr. Google for the element you're customizing. | ||