Home » Posts filed under HTML
Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts
Saturday, 8 December 2012
Saturday, 8 December 2012
- 0 Comments
B:
<base>: The HTML
<base> Element specifies the base URL to use for all relative URLs contained within a document.(learn more)
<bdi> : The HTML <bdi> Element (or Bi-Directional Isolation Element) isolates a span of text that might be formatted in a different direction from other text outside it.This element is useful when embedding text with an unknown directionality, from a database for example, inside text with a fixed directionality.(learn more)
<bdo>: The HTML
<bdo> Element (or HTML bidirectional override element) is used to override the current directionality of text. It causes the directionality of the characters to be ignored in favor of the specified directionality.(learn more)
Basic HTML Elements:
This HTML reference lists all HTML elements, defined in HTML5 or in a previous specification. When enclosed within angle brackets, they form HTML tags:
<elementname>. Elements are entities specifying how HTML documents should be built, and what kind of content should be placed in what part of an HTML document.
This page lists all standard HTML5 tags, but also older, obsolete and deprecated ones, as well as non-standard ones that browsers may support. Elements that were introduced in HTML5 are often referred as the new HTML5 elements, even though the other standard elements also are valid in HTML5.
html
Immediately after the doctype comes the
html element—this is the root element of the document tree and everything that follows is a descendant of that root element.
If the root element exists within the context of a document that’s identified by its doctype as XHTML, then the
html element also requires an xmlns (XML Namespace) attribute (this isn’t needed for HTML documents):<html xmlns="http://www.w3.org/1999/xhtml">
Here’s an example of an XHTML transitional page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Page title</title>
</head>
<body>
</body>
</html>
The
html element breaks the document into two main sections: the head and the body.
HTML Syntax
Writing valid HTML (or XHTML) is not a terribly difficult task once you know what the rules are, although the rules are slightly more stringent in XHTML than in HTML.
The Document Tree
A web page is, at its heart, little more than a collection of HTML elements—the defining structures that signify a paragraph, a table, a table cell, a quote, and so on. The element is created by writing an opening tag, and completed by writing a closing tag. In the case of a paragraph, you’d create a
p element by typing <p>Content goes here</p>.
The elements in a web page are contained in a tree structure in which
html is the root element that splits into the head and body elements (as explained in Basic Structure of a Web Page). An element may contain other nested elements (although this very much depends on what the parent element is; for example, a p element can contain span, em ,or strong elements, among Start to Learn HTML to design your Website:
First Let us go with basic Structure of a web page..!
Basic Structure of a Web Page
While this reference aims to provide a thorough breakdown of the various HTML elements and their respective attributes, you also need to understand how these items fit into the bigger picture. A web page is structured as follows.
The first item to appear in the source code of a web page is the doctype declaration. This provides the web browser (or other user agent) with information about the type of markup language in which the page is written, which may or may not affect the way the browser renders the content. It may look a little scary at first glance, but the good news is that most WYSIWYG web editors will create the doctype for you automatically after you’ve selected from a dialog the type of document you’re creating. If you aren’t using a WYSIWYG web editing package, you can refer to the list of doctypes contained in this reference and copy the one you want to use.
The doctype looks like this (as seen in the context of a very simple HTML 4.01 page without any content):
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Page title</title>
</head>
<body>
</body>
</html>
In the example above, the doctype relates to HTML 4.01 Strict. In this reference, you’ll see examples of HTML 4.01 and also XHTML 1.0 and 1.1, identified as such. While many of the elements and attributes may have the same names, there are some distinct syntactic differences between the various versions of HTML and XHTML.
Subscribe to:
Posts (Atom)