Flux rss
Bookmark Bookmark & Share
Tag HTML As balizas HTML  HTML-Tags Les balises HTML Marcado HTML

HTML, A Markup Language

HTML is not a programming language. Rather, it is used for describing the layout and format of content, written in the form of simple text.

An HTML page is a basic text file containing tags for specifying text format, images, etc. The use of these tags is called markup.

How do you use HTML markup?

A tag is a text element (a name) flanked by a less-than sign (<) and greater-than sign (>). For example, "<H1>".

HTML tags are not case-sensitive, meaning that it doesn't matter if they are entered in uppercase or lowercase letters.

HTML tags work in pairs, and affect whichever elements they are surrounding. The first one is called the opening tag, and the second one is called the closing tag. The closing tag begins with a backslash ( / ):

<tag> Your formatted text;  </tag>

For example, the tags <b> and </b> are used to put the text around them in bold letters:

<b> This text is in bold </b>

Some HTML tags are used alone rather than in pairs: the <br> tag, for example, represents a line break.

However, in order to stay as close as possible to the XHTML standard (which is much more strict than standard HTML), the following notation is recommended: <br />.

Nesting Tags

HTML tags can be nested within one another, to allow multiple properties to be applied to the same text. However, overlapping tags are not tolerated by the HTML standard. Here is an example of formatted text with nested tags:

<i><u>How Does It Work</u>, the free IT encyclopedia</i>
The example above gives the following result:
How Does It Work, the free IT encyclopedia
But the example below is incorrect:
<i><b>How Does It Work</i>, the free IT encyclopedia</b>

Attributes

An attribute is an element found within the opening tag that lets you define additional properties. Attributes are most often displayed as a name=value pair, but some attributes may sometimes be defined only by their name.

Here's an example of an attribute for a <p> tag (which defines a paragraph), specifying that the text must be right-aligned:

<p align="right">Example paragraph</p>

Each tag may include one or several attributes, each one with one or several values, or even none.

Spaces, line breaks, and tabs

HTML language disregards spaces, tabs, and line breaks, or more precisely, it considers a string of one or multiple spaces/tabs/line breaks to be a single space. This lets HTML code be indented to be more readable, without changing how the HTML page appears in the browser.

Note: The one exception is for code contained within <PRE> tags, whose very purpose is to keep text formatted (spaces, line breaks, etc.)

The following two portions of HTML code give the same result:

Example of
HTML
code

Example of HTML code

However, HTML has ways of expressly defining each of these layout elements:

  • Non-breaking space: A space which cannot be broken up by the end of a line. Its HTML encoding is &nbsp;.
  • Manual line break: An explicit line break. Its HTML encoding is <br> (<br /> for compliance with XHTML).

Note: The <NOBR> </NOBR> tag does the opposite, preventing the browser from breaking up a line automatically!

Comments

Information can be added to a web page without being shown on the screen, with a special set of tags called comment tags.

<!-- This is a comment -->

Comment tags are for commenting on text but can also be used to comment on the HTML code itself.

Note: The one exception is for code contained within <PRE> tags, whose very purpose is to keep text formatted (spaces, line breaks, etc.).


Last update on Thursday October 16, 2008 02:43:14 PM.This document entitled « HTML Markup » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.
Sending HTML markup in Out of Office Reply Hello, I want to send an Out Of Office reply using Outlook Exchange which contains HTML markup. I want it to get rendered when mail is received. en.kioskea.net/forum/affich-20899-sending-html-markup-in-out-of-office-reply
Outlook issue with HTML form (Solved) Hello, I have a small website with a very simple HTML form that allows user to send his data; then the webmaster receives an email with the data included in the form. My problem is that, when ever Outlook is set up on a machine, the email button open... en.kioskea.net/forum/affich-247-outlook-issue-with-html-form
HTML document layout HTML document An HTML page is a simple file containing text formatted with HTML tags. Traditionally, the file is given an .htm or .html extension, but a web page may have other extensions as well. A web page can be built from even the most basic... en.kioskea.net/contents/html/htmldocument.php3
How to easily display PHP/HTML codes in your webpagesHow to easily display PHP/HTML codes in your webpages What code to use? If you want your visitors to be able to see the source codes of your webpage, there is a very easy way to do so. Normally, all you have to do in a HTML file using... en.kioskea.net/faq/sujet-824-how-to-easily-display-php-html-codes-in-your-webpages
How to make a space in your html documentHow to make a space in your html document In HTML there is no way that the web browser can recognise the spaces inserted consecutively in between the letters. You can either try it in EI, Mozilla and Opera. The only way to do so is... en.kioskea.net/faq/sujet-1540-how-to-make-a-space-in-your-html-document
Modifying the height of element HTMLModifying the height of element HTML The style property “height” can be used to modify the height of an html element in javascript. For this you can refer to the following: Below is an indication of how to do this... en.kioskea.net/faq/sujet-910-modifying-the-height-of-element-html
Header and footer in HTML (Solved)Hello, Is it possible to include a header and footer file using HTML? I have my file (saved as a .html) and need to be able to include the HTML for the header and footer. Anyone know how I can do this? Thanks a lot. en.kioskea.net/forum/affich-196-header-and-footer-in-html
How to convert .doc ,.html,.xls file into .pdHello, i wanted a sample class for the conversion of .doc ,.html, .xls file into .pdf file the the PHP . needed urgently Thanks in advance en.kioskea.net/forum/affich-30014-how-to-convert-doc-html-xls-file-into-pd
How to view emal messages sent in HTMLHello, How can I veiw email messages sent in HTML format? I am receiving text only, but no pictures. I am using Outlook 2003 for my emails. Some of the newsletters I receive only show text, but no pictures or links. What setting do I need to change to... en.kioskea.net/forum/affich-10766-how-to-view-emal-messages-sent-in-html
Download HTML Calendar Maker ProHTML Calendar Maker Pro is a creation software of a monthly web page calendar. Easy to use, it does not require any knowledge on programming. The calendar is customizable: modification of colours and fonts, insertion of image and edition of the code... en.kioskea.net/telecharger/telecharger-2347-html-calendar-maker-pro
Download HTML TidyHTML Tidy is an utility allowing to prove and to optimize everything encodes HTML. The original version of this utility uses in mode of order only. The present version, called "MISTLETOE TIDY", has a graphic interface. Note that certain editors... en.kioskea.net/telecharger/telecharger-292-html-tidy
Download Print Wide HTMLPrint Wide HTML will allow you to print wide reports in HTML format or to convert them into PDF document. With this software, you can also convert Excel worksheet. Print Wide HTML prints any wide HTML which is generated by large image, map or data.... en.kioskea.net/telecharger/telecharger-4104-print-wide-html
Paragraphs in HTMLParagraphs HTML considers paragraphs to be blocks of text. Browsers do their best to fit the contents of paragraphs into the window, unless the NOWRAP or NOBR attribute is explicitly specified. Within a paragraph, all spaces, tabs, and line breaks... en.kioskea.net/contents/html/htmlparagraphes.php3
Lists in HTMLLists A list is a structured paragraph containing a series of items. HTML defines three types of lists: Ordered lists; Unordered lists; Definition lists. Ordered Lists Container Type of List Visual Effect item... en.kioskea.net/contents/html/htmllistes.php3
Introduction to HTMLIntroduction to HTML HTML (HyperText Mark-Up Language) is what is known as a "mark-up language" whose role is to prepare written documents using formatting tags. The tags indicate how the document is presented and how it links to other documents.... en.kioskea.net/contents/html/htmlintro.php3