This is a discussion on Basic HTML within the Programming Articles forums, part of the Webmaster Articles/Tutorials category; The <html> Tag The <html> tag delimits the beginning and the end of an HTML document. It is used at ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| | #1 (permalink) |
| WMT Addict | The <html> Tag The <html> tag delimits the beginning and the end of an HTML document. It is used at the beginning and the end of each document. Example: <html> More tags we will learn soon </html> The <head> Tag The head tag is used to describe the content of the document. The head of an HTML document is. In many cases, the information contained within the <head>tag is information about the information of the page. The <head> tag can include scripts, style sheets, comments, and a page title. The <head> tag lies inbetween the <html> tag and the <body> tag. The <title> Tag The title tag lies in between the <head> tag. Putting text in the title tag will make the title of the page. The <body> Tag The body tag is a common tag, and is used for the page context. All the stuff you are seeing right now lies in the <body> tag. Example: <html> <head> <title> Webpage </title> </head> <body> More tags we will learn soon </head> </html> Headings The heading elements are used to create "headlines" in documents. Six different levels of headings are used: <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. These range in importance from <h1>, the most important, to <h6>, the least important. Most browsers display headings in larger and/or bolder font than normal text. Headings are commonly used for titles, important dates, and things like that. An example of one heading is the word Headings, the title of this paragraph. Here is an example of how headings work: <html> <head> <title>Heading</title> </head> <body> <h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6> </body> </html> Paragraphs and Breaks Surrounding text with the <p> and </p> tags indicates that the text is a logical paragraph unit. In general, the browser places a blank line or two before the paragraph, but the exact rendering of the text depends on the browser and any applied style sheet. Text within the <p> tags generally is rendered flush left, with a ragged right margin. Like headings, the align attribute makes it possible to specify a left, right, or center alignment. You also can set an align value of justify, to justify all text in the paragraph. Due to the poor quality of justification in some browsers, this value is used only rarely. Lists Modern HTML has three basic forms of lists: ordered lists (<ol>), unordered lists (<ul>), and definition lists (<dl>). Lists are block-level, although they can be nested, and their items can contain other block-level structures, such as paragraphs Ordered Lists An ordered list, as enclosed by <ol> and </ol>, defines a list in which order matters. Ordering typically is rendered by a numbering scheme, using Arabic numbers, letters, or Roman numerals. Ordered lists are suitable for creating simple outlines or step-by-step instructions because the list items are automatically numbered by the browser. List items in ordered and other lists are defined by using the list item tag, <li>, which doesn't require an end tag under traditional HTML. For XHTML compliance, however, the use of the closing </li> tag is required. List items usually are indented by the browser. Numbering starts from one. A generic ordered list looks like this: <ol> <li>Item 1</li> <li>Item 2</li> <li>Item n</li> </ol> Unordered Lists An unordered list, signified by <ul> and </ul>, is used for lists of items in which the ordering is not specific. This can be useful in a list of features and benefits for a product. A browser typically adds a bullet of some sort (a filled circle, a square, or an empty circle) for each item and indents the list. Here is an example of the <ul> tag: <ul> <li>Unordered lists <ul> <li>can be nested. <ul> <li>Bullet changes nesting.</li> </ul> </li> </ul> </li> </ul> Horizontal Rules As sections are added to an HTML document, it is often useful to break up the document into visually distinct regions. A horizontal rule, indicated by the <hr> tag, is an empty block- level element that serves this purpose. horizontal rules are written as <hr/>. Example of <hr>: <hr width=%100> Which will create a line across the entire page. Character Entities Sometimes, you need to put special characters within a document, such as accented letters, copyright symbols, or even the angle brackets used to enclose HTML elements. Here is a list of all of them: Numeric Value Named Value Symbol Description " " ? Quotation mark & & & Ampersand < < < Less than > > > Greater than ? ™ ? Trademark * Non-breaking space ? © ? Copyright symbol ? ® ? Registered trademark Comments The last topic that should be considered a core aspect of HTML is the use of comments in an HTML document. The contents of HTML comments are not displayed within a browser window. Comments are denoted by a start value of <!-- and an end value of -->. Comments can be many lines long. For example, <!--Comments--> |
| | |
| Tags |
| basic, html |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I need help with html | macca-tom | Graphics Forum | 11 | 21-05-2008 21:09 |
| Shopping Cart Script - BASIC | Gilligan | Php and MySQL | 2 | 13-02-2008 18:35 |
| Basic HTML? | 01wojtowicz | HTML, DHTML and CSS | 3 | 31-08-2005 10:20 |
| Basic Javascript | Morphmaster | Programming Articles | 0 | 26-06-2005 18:46 |
| Basic Buttons | asgsoft | Flash Articles | 2 | 14-05-2005 09:49 |