HTML 5 Flashcards
basic html document
<!DOCTYPE html>
Example 01 This is my first document.
XHTML Example
An HTML Document
Example
This is an example HTML document.
Why XHTML document does not need to include the DOCTYPE
because XHTML documents that are delivered correctly using an XML MIME type and are processed as XML by browsers, are always rendered in no quirks mode. However, the DOCTYPE may optionally be included, and should be included if the document uses the compatible subset of markup that is conforming in both HTML and XHTML, and is ever expected to be used in text/html environments.
Metadata elements
appear within the head of a document. Some common examples of metadata elements include: title, meta, link, script and style.
It is considered good practice to specify the primary language of the document on this element using the ____________ tag
<!DOCTYPE html>
... ...
xmlns attribute
In the XHTML syntax, the xmlns attribute needs to be specified on this element to declare that it is in the HTML namespace. You may use either the lang or xml:lang attribute to specify the langauge.
base element (explanation)
specifying a base URL against which relative links will be resolved, and the name of the default target for opening links and form submissions
base element (example)
- Notice that we have only specified a relative address
….
link element (explanation)
The link is for linking to other resources, such as stylesheets, favicons and syndication feeds.
embed style in document
<!--
...css goes here..
-->
embed java script in a document
My First Web Page
” + Date() + “
noscript element (explanation)
used to provide alternative content for users using browsers that do not support scripting or have it disabled.
noscript element (code)
Check out the current time:
World Time Server
element attributes (list)
onbeforeunload onerror onhashchange onload onmessage onoffline ononline onpopstate onresize onstorage onunload
Tag
WWF
The World Wide Fund for Nature (WWF) is….
Tag
The tag defines a section of navigation links.
Not all links of a document must be in a element. The element is intended only for major block of navigation links.
Browsers, such as screen readers for disabled users, can use this element to determine whether to omit the initial rendering of this content.
Tag
tag specifies independent, self-contained content.
An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.
Tag
Epcot Center
The Epcot Center is a theme park in Disney World, Florida.
Tag
The tag specifies a header for a document or section.
The element should be used as a container for introductory content or set of navigational links.
You can have several elements in one document.
Tag
tag defines a footer for a document or section.
A element should contain information about it’s containing element.
A footer typically contains the author of the document, copyright information, links to terms of use, contact information, etc.
You can have several elements in one document.
Tag (explanation)
<!DOCTYPE html>
Written by Jon Doe.
Visit us at: Example.com
Box 564, Disneyland USA
Tag
tag is supported in all major browsers.
Tag
represents the title of a work, such as an article, a book, a poem, a song, a film, or any other creative work.
, , , , , , and element
The , , , , , , and tags are all phrase tags. They are not deprecated, but it is possible to achieve richer effect with CSS.