Forms (Core Concept)
HTML Forms An HTML form is used to collect user input. The user input is most often sent to a server for processing. The <form> Element The HTML <form> element is used to create an HTML form for user input:
|
1 2 3 4 5 |
<form> . form elements . </form> |
The <form> element is a container for different types of input elements, such as: text fields, checkboxes, radio […]
Tables
HTML Tables HTML tables allow web developers to arrange data into rows and columns. Define an HTML Table A table in HTML consists of table cells inside rows and columns. Example
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<!DOCTYPE html> <html> <style> table, th, td { border:1px solid black; } </style> <body> <h3>A basic HTML table</h3> <table style="width:100%"> <tr> <th>Company</th> <th>Contact</th> <th>Country</th> </tr> <tr> <td>Alfreds Futterkiste</td> <td>Maria Anders</td> <td>Germany</td> </tr> <tr> <td>Centro comercial Moctezuma</td> <td>Francisco Chang</td> <td>Mexico</td> </tr> </table> <p>To understand the example better, we have added borders to the table.</p> </body> </html> |
Result A basic HTML table Company Contact Country Alfreds Futterkiste Maria Anders Germany Centro comercial Moctezuma Francisco Chang Mexico To understand the example better, […]
Lists
HTML Lists Unordered HTML List An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items will be marked with bullets (small black circles) by default: Ordered HTML List An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items will be marked with numbers by default: […]
Images
HTML Images Images can improve the design and the appearance of a web page. Example
|
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <body> <h3>HTML Image</h3> <img src="pic_trulli.jpg" alt="Trulli" width="500" height="333"> </body> </html> |
Result HTML Image HTML Images Syntax The HTML <img> tag is used to embed an image in a web page. Images are not technically inserted into a web page; images are linked to web pages. The <img> tag creates a holding space for the […]
Links & Navigation
HTML Links Elements HTML Links – Hyperlinks HTML links are hyperlinks. You can click on a link and jump to another document. When you move the mouse over a link, the mouse arrow will turn into a little hand. HTML Links – Syntax The HTML <a> tag defines a hyperlink. It has the following syntax: The most […]
Text Formatting Tags
HTML Text Formatting HTML contains several elements for defining text with a special meaning. Example This text is bold This text is italic This is subscript and superscript
|
1 2 3 4 5 6 7 8 9 10 |
<!DOCTYPE html> <html> <body> <p><b>This text is bold</b></p> <p><i>This text is italic</i></p> <p>This is<sub> subscript</sub> and <sup>superscript</sup></p> </body> </html> |
HTML Formatting Elements Formatting elements were designed to display special types of text: <b> – Bold text <strong> – Important text <i> – Italic text <em> – Emphasized text <mark> – Marked text <small> – […]
Headings & Paragraphs
HTML Headings HTML headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading. Example
|
1 2 3 4 5 6 |
<h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6> |
Headings Are Important Search engines use the headings to index the structure and content of your web pages. Users often skim a page by its headings. It is important to use headings to show the document structure. […]
All Tags and It’s Activities
Tag Description <!–…–> Defines a comment <!DOCTYPE> Defines the document type <a> Defines a hyperlink <abbr> Defines an abbreviation or an acronym <acronym> Not supported in HTML5. Use <abbr> instead.Defines an acronym <address> Defines contact information for the author/owner of a document <applet> Not supported in HTML5. Use <embed> or <object> instead.Defines an embedded applet […]
Basic HTML Structure
All HTML documents must start with a document type declaration: <!DOCTYPE html> he HTML document itself begins with <html> and ends with </html> The visible part of the HTML document is between <body> and </body> Example:
|
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> |
HTML Attributes All HTML elements can have attributes Attributes provide additional information about elements Attributes are always specified in the start tag Attributes usually come in name/value pairs like: name=”value” […]
Introduction to HTML
What is HTML? HTML stands for Hyper Text Markup Language HTML is the standard markup language for creating Web pages HTML describes the structure of a Web page HTML consists of a series of elements HTML elements tell the browser how to display the content HTML elements label pieces of content such as “this is […]