<HTML>Hypertext Markup Language
WHAT IS HTML? • HTML is a language for describing web pages. • HTML stands for Hyper Text Markup Language • HTML is a markup language • A markup language is a set of markup tags • The tags describe document content • HTML documents contain HTML tags and plain text • HTML documents are also called web pages
HTML TAGS • HTML markup tags are usually called HTML tags • HTML tags are keywords (tag names) 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 • The end tag is written like the start tag, with a forward slash before the tag name • Start and end tags are also called opening tags and closing tags
HTML ELEMENTS • "HTML tags" and "HTML elements" are often used to describe the same thing. HTML Element: <p>This is a paragraph.</p>
WEB BROWSERS • The purpose of a web browser (such as Google Chrome, Internet Explorer, Firefox, Safari) is to read HTML documents and display them as web pages. • The browser does not display the HTML tags, but uses the tags to determine how the content of the HTML page is to be presented/displayed to the user
HTML PAGE STRUCTURE
HTML VERSIONS
HTML EDITORS • HTML can be edited by using a professional HTML editor like: • Adobe Dreamweaver • Microsoft Expression Web • CoffeeCup HTML Editor • Notepad ++ / Notepad
HTML BASICS • HTML Headings • HTML headings are defined with the <h1> to <h6> tags. • Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3>
HTML BASICS • HTML Paragraphs • HTML paragraphs are defined with the <p> tag. • Example <p>This is a paragraph.</p> <p>This is another paragraph.</p> • HTML Links • HTML links are defined with the <a> tag. • Example <a href="http://www.w3schools.com">This is a link</a>
HTML BASICS • HTML Images • HTML images are defined with the <img> tag. • Example <img src="w3schools.jpg" width="104" height="142">
HTML ELEMENTS • HTML documents are defined by HTML elements. • An HTML element is everything from the start tag to the end tag. • The start tag is often called the opening tag. The end tag is often called the closing tag • Example
HTML DOCUMENT EXAMPLE <!DOCTYPE html> <html> <body> <p>This is my first paragraph.</p> </body> </html>
EMPTY HTML ELEMENTS • HTML elements with no content are called empty elements. • <br> is an empty element without a closing tag (the <br> tag defines a line break).
HTML ATTRIBUTES • Attributes provide additional information about HTML elements. • HTML elements can have attributes • Attributes provide additional information about an element • Attributes are always specified in the start tag • Attributes come in name/value pairs like: name="value“ • Example <a href="http://www.mcsoftsis.com">This is a link</a>
HTML HEADINGS • HTML Headings • Headings are defined with the <h1> to <h6> tags. • <h1> defines the most important heading. <h6> defines the least important heading. • Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3>
HTML LINES • The <hr> tag creates a horizontal line in an HTML page. • The hr element can be used to separate content: • Example <p>This is a paragraph.</p> <hr> <p>This is a paragraph.</p> <hr> <p>This is a paragraph.</p>
HTML COMMENTS • Comments can be inserted into the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed. • Comments are written like this: • Example <!-- This is a comment -->
HTML PARAGRAPHS • Paragraphs are defined with the <p> tag. • Example <p>This is a paragraph</p> <p>This is another paragraph</p>
HTML LINE BREAKS • Use the <br> tag if you want a line break (a new line) without starting a new paragraph: • <p>This is<br>a para<br>graph with line breaks</p> • The <br> element is an empty HTML element. It has no end tag.
HTML TEXT FORMATTING • HTML uses tags like <b> and <i> for formatting output, like bold or italic text.
HTML HYPERLINKS (LINKS) • The HTML <a> tag defines a hyperlink. • A hyperlink (or link) is a word, group of words, or image that you can click on to jump to another document. • When you move the cursor over a link in a Web page, the arrow will turn into a little hand. • The most important attribute of the <a> element is the href attribute, which indicates the link’s destination. • By default, links will appear as follows in all browsers: • An unvisited link is underlined and blue • A visited link is underlined and purple • An active link is underlined and red
HTML <HEAD> • The <head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.
THE HTML <TITLE> ELEMENT • The <title> tag defines the title of the document. • The <title> element is required in all HTML/XHTML documents. • The <title> element: • defines a title in the browser toolbar • provides a title for the page when it is added to favorites • displays a title for the page in search-engine results
THE HTML <STYLE> ELEMENT • The <style> tag is used to define style information for an HTML document. • Inside the <style> element you specify how HTML elements should render in a browser: <head> <style type="text/css"> body {background-color:yellow;} p {color:blue;} </style> </head>
HTML STYLES - CSS • CSS was introduced together with HTML 4, to provide a better way to style HTML elements. • CSS can be added to HTML in the following ways: 1. Inline - using the style attribute in HTML elements 2. Internal - using the <style> element in the <head> section 3. External - using an external CSS file
HTML IMAGES • In HTML, images are defined with the <img> tag. • The <img> tag is empty, which means that it contains attributes only, and has no closing tag. • To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image you want to display. • Syntax for defining an image: <img src="url" alt="some_text">
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 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>
HTML UNORDERED LISTS • An unordered list starts with the <ul> tag. Each list 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
HTML ORDERED LISTS • An ordered list starts with the <ol> tag. Each list item 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
HTML FORMS • HTML forms are used to pass data to a server. • The <form> tag is used to create an HTML form: • <form> . input elements . </form>
HTML FORMS - THE INPUT ELEMENT • The most important form element is the <input> element. • The <input> element is used to select user information. • An <input> element can vary in many ways, depending on the type attribute. An <input> element can be of type text field, checkbox, password, radio button, submit button, and more.
HTML IFRAMES • An iframe is used to display a web page within a web page. • Syntax for adding an iframe: <iframe src="URL"></iframe> • The URL points to the location of the separate page.
HTML COLORS • HTML colors are defined using a hexadecimal notation (HEX) for the combination of Red, Green, and Blue color values (RGB).
THANK YOU

Learn html Basics

  • 1.
  • 2.
    WHAT IS HTML? •HTML is a language for describing web pages. • HTML stands for Hyper Text Markup Language • HTML is a markup language • A markup language is a set of markup tags • The tags describe document content • HTML documents contain HTML tags and plain text • HTML documents are also called web pages
  • 3.
    HTML TAGS • HTMLmarkup tags are usually called HTML tags • HTML tags are keywords (tag names) 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 • The end tag is written like the start tag, with a forward slash before the tag name • Start and end tags are also called opening tags and closing tags
  • 4.
    HTML ELEMENTS • "HTMLtags" and "HTML elements" are often used to describe the same thing. HTML Element: <p>This is a paragraph.</p>
  • 5.
    WEB BROWSERS • Thepurpose of a web browser (such as Google Chrome, Internet Explorer, Firefox, Safari) is to read HTML documents and display them as web pages. • The browser does not display the HTML tags, but uses the tags to determine how the content of the HTML page is to be presented/displayed to the user
  • 6.
  • 7.
  • 8.
    HTML EDITORS • HTMLcan be edited by using a professional HTML editor like: • Adobe Dreamweaver • Microsoft Expression Web • CoffeeCup HTML Editor • Notepad ++ / Notepad
  • 9.
    HTML BASICS • HTMLHeadings • HTML headings are defined with the <h1> to <h6> tags. • Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3>
  • 10.
    HTML BASICS • HTMLParagraphs • HTML paragraphs are defined with the <p> tag. • Example <p>This is a paragraph.</p> <p>This is another paragraph.</p> • HTML Links • HTML links are defined with the <a> tag. • Example <a href="http://www.w3schools.com">This is a link</a>
  • 11.
    HTML BASICS • HTMLImages • HTML images are defined with the <img> tag. • Example <img src="w3schools.jpg" width="104" height="142">
  • 12.
    HTML ELEMENTS • HTMLdocuments are defined by HTML elements. • An HTML element is everything from the start tag to the end tag. • The start tag is often called the opening tag. The end tag is often called the closing tag • Example
  • 13.
    HTML DOCUMENT EXAMPLE <!DOCTYPEhtml> <html> <body> <p>This is my first paragraph.</p> </body> </html>
  • 14.
    EMPTY HTML ELEMENTS •HTML elements with no content are called empty elements. • <br> is an empty element without a closing tag (the <br> tag defines a line break).
  • 15.
    HTML ATTRIBUTES • Attributesprovide additional information about HTML elements. • HTML elements can have attributes • Attributes provide additional information about an element • Attributes are always specified in the start tag • Attributes come in name/value pairs like: name="value“ • Example <a href="http://www.mcsoftsis.com">This is a link</a>
  • 16.
    HTML HEADINGS • HTMLHeadings • Headings are defined with the <h1> to <h6> tags. • <h1> defines the most important heading. <h6> defines the least important heading. • Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3>
  • 17.
    HTML LINES • The<hr> tag creates a horizontal line in an HTML page. • The hr element can be used to separate content: • Example <p>This is a paragraph.</p> <hr> <p>This is a paragraph.</p> <hr> <p>This is a paragraph.</p>
  • 18.
    HTML COMMENTS • Commentscan be inserted into the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed. • Comments are written like this: • Example <!-- This is a comment -->
  • 19.
    HTML PARAGRAPHS • Paragraphsare defined with the <p> tag. • Example <p>This is a paragraph</p> <p>This is another paragraph</p>
  • 20.
    HTML LINE BREAKS •Use the <br> tag if you want a line break (a new line) without starting a new paragraph: • <p>This is<br>a para<br>graph with line breaks</p> • The <br> element is an empty HTML element. It has no end tag.
  • 21.
    HTML TEXT FORMATTING •HTML uses tags like <b> and <i> for formatting output, like bold or italic text.
  • 22.
    HTML HYPERLINKS (LINKS) •The HTML <a> tag defines a hyperlink. • A hyperlink (or link) is a word, group of words, or image that you can click on to jump to another document. • When you move the cursor over a link in a Web page, the arrow will turn into a little hand. • The most important attribute of the <a> element is the href attribute, which indicates the link’s destination. • By default, links will appear as follows in all browsers: • An unvisited link is underlined and blue • A visited link is underlined and purple • An active link is underlined and red
  • 23.
    HTML <HEAD> • The<head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.
  • 24.
    THE HTML <TITLE>ELEMENT • The <title> tag defines the title of the document. • The <title> element is required in all HTML/XHTML documents. • The <title> element: • defines a title in the browser toolbar • provides a title for the page when it is added to favorites • displays a title for the page in search-engine results
  • 25.
    THE HTML <STYLE>ELEMENT • The <style> tag is used to define style information for an HTML document. • Inside the <style> element you specify how HTML elements should render in a browser: <head> <style type="text/css"> body {background-color:yellow;} p {color:blue;} </style> </head>
  • 26.
    HTML STYLES -CSS • CSS was introduced together with HTML 4, to provide a better way to style HTML elements. • CSS can be added to HTML in the following ways: 1. Inline - using the style attribute in HTML elements 2. Internal - using the <style> element in the <head> section 3. External - using an external CSS file
  • 27.
    HTML IMAGES • InHTML, images are defined with the <img> tag. • The <img> tag is empty, which means that it contains attributes only, and has no closing tag. • To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image you want to display. • Syntax for defining an image: <img src="url" alt="some_text">
  • 28.
    HTML TABLES • Tablesare 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 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>
  • 29.
    HTML UNORDERED LISTS •An unordered list starts with the <ul> tag. Each list 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
  • 30.
    HTML ORDERED LISTS •An ordered list starts with the <ol> tag. Each list item 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
  • 31.
    HTML FORMS • HTMLforms are used to pass data to a server. • The <form> tag is used to create an HTML form: • <form> . input elements . </form>
  • 32.
    HTML FORMS -THE INPUT ELEMENT • The most important form element is the <input> element. • The <input> element is used to select user information. • An <input> element can vary in many ways, depending on the type attribute. An <input> element can be of type text field, checkbox, password, radio button, submit button, and more.
  • 33.
    HTML IFRAMES • Aniframe is used to display a web page within a web page. • Syntax for adding an iframe: <iframe src="URL"></iframe> • The URL points to the location of the separate page.
  • 34.
    HTML COLORS • HTMLcolors are defined using a hexadecimal notation (HEX) for the combination of Red, Green, and Blue color values (RGB).
  • 35.