Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Tags
Attributes
src
the
href
classattribute,
id
resource.
1 <a href="http://shayhowe.com/">Shay Howe</a>
2
id
or
class
1 p { ... }
2
Properties
1p {
2 color: ...;
3 font-size: ...;
4}
5
Values
1p {
2 color: orange;
3 font-size: 16px;
<h1>
or
<p>.
4}
Fig 1
div.
<div>,
we would use a
HTML
1 <div>...</div>
2 <div>...</div>
3
Class Selectors
We can classify similar elements in html , then class selector should be used !
CSS
1 .awesome { ... }
2
HTML
1 <div class="awesome">...</div>
2 <p class="awesome">...</p>
3
ID Selectors
ID selectors are even more precise than class selectors, as they target
only one unique element at a time.
Regardless of which type of element they appear on,
id
attribute values
can only be used once per page. If used they should be reserved for
significant elements.
Within CSS, ID selectors are denoted by a leading hash sign, #,
followed by the
id
attribute value.
CSS
1 #shayhowe { ... }
2
HTML
1 <div id="shayhowe">...</div>
2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
<p>This is a web page.</p>
</body>
</html>
<!DOCTYPE html>
HTML 4.01 Strict
This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational
or deprecated elements (like font). Framesets are not allowed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
HTML 4.01 Transitional
This DTD contains all HTML elements and attributes, INCLUDING presentational and
deprecated elements (like font). Framesets are not allowed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
HTML 4.01 Frameset
This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
XHTML 1.0 Strict
This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational
or deprecated elements (like font). Framesets are not allowed. The markup must also be
written as well-formed XML.
Meta tags
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="Description" CONTENT="Author: A.N. Author,
Illustrator: P. Picture, Category: Books, Price:
9.24, Length:
784 pages">
<meta name="google-site-verification"
content="+nxGUDJ4QpAZ5l9Bsjdi102tLVC21AIh5d1Nl23908vVuFHs34="/>
<title>Example Books - high-quality used books for
children</title>
<meta name="robots" content="noindex,nofollow">
Google understands the following meta tags (and related items):
<meta name="description"
content="A description of the
page" />
<meta name="robots"
content="..., ..." />
<meta name="googlebot"
content="..., ..." />
<meta name="google"
content="nositelinkssearchbox"
/>
<meta name="google"
content="notranslate" />
You can use this tag on the toplevel page of your site to verify
ownership for Webmaster Tools.
Please note that while the values
of the "name" and "content"
attributes must match exactly
what is provided to you (including
upper and lower case), it doesn't
matter if you change the tag from
XHTML to HTML or if the format of
the tag matches the format of your
page.
<meta http-equiv="Content-Type"
content="...; charset=..." />
<meta charset="..." >
<meta http-equiv="refresh"
content="...;url=..." />
Self-Closing Elements
<br> <embed> <hr> <img> <input> <link> <meta> <param> <source> <wbr>
Divisions, or
<div>s,
and
<span>s