Saturday, February 7, 2015

Lab 2 Part I - HTML head tags

We covered a few tags for the <head> in lecture and I found more in other reading. I list all here.

<title> defines the title of the page.
Example:
<title> Page Title </title> 

<meta> is used to provide additional information about the page including page description, keywords, author, and other meta data.
The meta element can include the following attributes: name, content, charset
Example:
<meta name="keywords" content="HTML, CSS, web development, user interface">
<meta name="author" content="Robert Frost">
<meta charset="UTF-8">

<style> sets out style information. This is used for embedded CSS.
Example:
<style>
body {background-color:purple;}
p    {color:blue;}
</style>

<link> links the page to other resources like style sheets.
<link rel="stylesheet" href="mystyle.css">

There are also <base> and <script> tags used in the head, but we have not covered them in class yet.

<base> sets the default address and target for links on the page
<script> refers to an external script (like JavaScript)



No comments:

Post a Comment