Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language A markup language is a set of markup tags HTML uses markup tags to describe web pages
HTML Tags
HTML markup tags are usually called HTML tags HTML tags are keywords surrounded by angle brackets like <html> HTML tags normally come in pairs like <b> and </b> The first tag in a pair is the start tag, the second tag is the end tag Start and end tags are also called opening tags and closing tags
text The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page: documents are also called web pages
web page The text between <body> and </body> is the visible page content The text between <h1> and </h1> is displayed as a heading The text between <p> and </p> is displayed as a paragraph
to edit HTML When you save an HTML file, you can use either the .htm or the .html file extension
Basic HTML
HTML Headings
HTML Paragraphs
HTML paragraphs are defined with the <p> tag.
Example
<p>This is a paragraph.</p>
HTML Links
HTML links are defined with the <a> tag. Example
<a href="http://www.yahoo.com">Yahoo</a>
HTML Images
HTML images are defined with the <img> tag. Example <img src=smile.jpg" width="104" height="142" />
HTML Formatting Tags HTML uses tags like <b> and <i> for formatting
output, like bold or italic text. These HTML tags are called formatting tags
COMMENTING CODE
<!--This is a comment. Comments are not displayed in
the browser-->
HTML LISTS
The most common HTML lists are ordered and
unordered lists:
starts with the <li> tag. The list items are marked with numbers. <ol> <li>Coffee</li> <li>Milk</li> </ol> How the HTML code above looks in a browser: 1. Coffee 2. Milk
item starts with the <li> tag. The list items are marked with bullets (typically small black circles). <ul> <li>Coffee</li> <li>Milk</li> </ul> How the HTML code above looks in a browser: Coffee Milk
each item. The <dl> tag defines a definition list. The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list): <dl> <dt>Coffee</dt> <dd>- black hot drink</dd> <dt>Milk</dt> <dd>- white cold drink</dd> </dl>
Milk
HTML Tables
Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and
each row is divided into data cells (with the <td> tag). td stands for "table data," and holds the content of a data cell. A <td> tag can contain text, links, images, lists, forms, other tables, etc.
Table Example
<table border="1">
<tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
<th> tag.
<tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>
input. HTML Forms pass data to a server. it contains input elements like Text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements. The <form> tag is used to create an HTML form: <form> input elements. </form>
password, radio button, submit button, and more. 1. Text Fields <input type="text" /> defines a one-line input field that a user can enter text into: <form> First name: <input type="text" name="firstname" /><br /> Last name: <input type="text" name="lastname" /> </form>
Password Field
<input type="password" /> defines a password field: <form>
Password: <input type="password" name="pwd" /> </form> How the HTML code above looks in a browser:
circles).
Radio Buttons
<input type="radio" /> defines a radio button. Radio buttons let a user select ONLY ONE Option
among rest of all option <form> <input type="radio" name=Gender" value="male" /> Male<br /> <input type="radio" name="Gender" value="female" /> Female </form> How the HTML code above looks in a browser:
Checkboxes let a user select ONE or MORE options of a limited number of choices. <form> <input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br /> <input type="checkbox" name="vehicle" value="Car" /> I have a car </form> How the HTML code above looks in a browser:
Submit Button
<input type="submit" /> defines a submit button. A submit button is used to send form data to a server.
The data is sent to the page specified in the form's action attribute. The file defined in the action attribute usually does something with the received input: <form name="input" action="html_form_action.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> How the HTML code above looks in a browser:
click the "Submit" button, the browser will send your input to a page called "html_form_action.asp". The page will show you the received input.
3. Input tag
hyperlinks , but it should also be broken up into areas for structure, which aids memory and ordering resources. A web site generally has a root directory, the one which is entered first, then several sub-directories that serves as the sub-sites.
be picked up by the browser simply by going to http://www.mywebsite.co.uk. It uses several images that are collected under an images sub directory. There are two further sub-sites under the main root directory , namely cats and holidays. http://www.mywebsite.co.uk/cats/
XML
XML stands for eXtensible Markup Language. XML is designed to transport and store data.
data(describe), with focus on what data is. HTML was designed to display data, with focus on how data looks. HTML is about displaying information, while XML is about carrying information.
Introduction to XHTML
XHTML is a stricter and cleaner version of HTML. XHTML is a combination of HTML and XML
(EXtensible Markup Language). XHTML consists of all the elements in HTML 4.01, combined with the strict syntax of XML.
Move to XHTML
The head and body tag elements are required in
XHTML whereas in HTML they are optional. Document Structure <!DOCTYPE HTML PUBLIC -//W3C//DTD XHTML 1.00 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd> <html xmlns = http://www.w3.org/1999/xhtml> <head> <title> First XHTML page </title></head> <body> <p> Hello World</p> </body> </html>
Move to XHTML
All XHTML tag and attribute names must be in
lowercase and all attribute values must enclosed in quotes. Attributes cannot be abbreviated and should appear fully written out. An XHTML document must specify a document title. There should be XML declaration: <?xml version =1.0 ?> Document type can be transitional,frameset,Basic etc.
Meta Tags
Metadata is information about information or , in this
context more specifically , metadata is machineunderstandable information about web resources. It is included in the head section. Example <html> <head> <meta name = author content=Fred Flintstone/> <meta name = keywords content = stone age,lifestyles,retro/> </head> </html>
Meta Tags
In the head section to set an expiration date:
<meta name = expires content=Mon, 20 Jul 2007 16:00:00 GMT/> This sets the expiry point when a page will be reloaded from the Web site. To force a refresh after a period of time <meta name=refresh content=50;http://myownpages.co.uk/mynewssite.ht ml/> This will cause page to be refreshed after 50 seconds and a redirection to occur to the URL specified.
Meta Tags
A browser can be stopped from caching a page, if it
supports <meta> elements http-equiv attribute. <meta http-equiv = pragma content=no-cache/> This forces browser to ignore the cached page and instead make a request again.
To do this the value pragma is assigned to the http-
Frame
Frameset : Vertical
Frameset : Horizontal
Character Entities
They are useful for inserting symbols that arent
usually available or just for placing spaces around text in the code.
Inside a Browser
The controller acts as the main component of operations
between various components. For example it is responsible for collecting input from the user and also managing outgoing requests for the HTTP client to deal with for external communication. HTML and script are channeled through to the interpreters as needed and output from these is put through special display drivers. The browser can be extended with plug-in modules, which enhance capabilities such as multimedia,graphics and sound.