STANDAR
•HTML
2 (1995)
•HTML
3.2 (1996)
•HMTL
4.0 (1997)
•HTML
4.01 (2000)
•HTML
5 (2008)
ANATOMI HTML
•<!DOCTYPE
html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
Doc Type
•HTML
5
<!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">
•XHTML
1.0 Frameset
This
DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content.
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
•XHTML
1.1
This
DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to
provide ruby support for East-Asian languages).
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
•XHTML
1.0 Transitional
This
DTD contains all HTML elements and attributes, INCLUDING presentational and
deprecated elements (like font). Framesets are not allowed. The markup must
also be written as well-formed XML.
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
HTML HEAD
•<head>
Defines information about the document
•<title>
Defines the title of a document
•<base>
Defines a default address or a default
target for all links on a page
•<link>
Defines the relationship between a
document and an external resource
•<meta>
Defines metadata about an HTML document
•<script>
Defines a client-side script
•<style>
Defines style information for a document
The
HTML <title> Element
•The
<title> tag defines the title of the document.
•The
<title> element is required in all HTML/XHTML documents.
•The
<title> element:
•defines
a title in the browser toolbar
•provides
a title for the page when it is added to favorites
•displays
a title for the page in search-engine results
•A
simplified HTML document:
•<!DOCTYPE
html><html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body></html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body></html>
The
HTML <base> Element
The <base> tag specifies the base
URL/target for all relative URLs in a page:
<head>
<base
href="http://www.w3schools.com/images/" target="_blank">
</head>
The
HTML <link> Element
•The
<link> tag defines the relationship between a document and an external
resource.
The
<link> tag is most used to link to style sheets:
<head>
<link
rel="stylesheet" type="text/css"
href="mystyle.css">
</head>
The
HTML <style> Element
•The
<style> tag is used to define style information for an HTML document.
•Inside
the <style> element you specify how HTML elements should render in a
browser:
<head>
<style
type="text/css">
body
{background-color:yellow;}
p
{color:blue;}
</style>
</head>
The
HTML <meta> Element
•Metadata
is data (information) about data.
•The
<meta> tag provides metadata about the HTML document. Metadata will not
be displayed on the page, but will be machine parsable.
•Meta
elements are typically used to specify page description, keywords, author of
the document, last modified, and other metadata.
•The
metadata can be used by browsers (how to display content or reload page),
search engines (keywords), or other web services.
•<meta>
tags always go inside the <head> element.
<meta>
Tags - Examples of Use
•Define
keywords for search engines:
<meta
name="keywords" content="HTML, CSS, XML, XHTML,
JavaScript">
•Define
a description of your web page:
<meta
name="description" content="Free Web tutorials on HTML and
CSS">
•Define
the author of a page:
<meta
name="author" content="Hege Refsnes">
•Refresh
document every 30 seconds:
<meta
http-equiv="refresh" content="30">
The
HTML <script> Element
•The
<script> tag is used to define a client-side script, such as a
JavaScript.
•The
<script> element will be explained in a later chapter.
SUMBER : https://elearning.unisbank.ac.id/mod/resource/view.php?id=12742
Tidak ada komentar:
Posting Komentar