Introduction to HTML H ype r T ext   M arkup   L anguage Dr. David Asirvatham Multimedia University Intro to HTML David Asirvatham
Basics of HTML HTML documents are divided into  elements , which are marked by  tags  of the form: <Tag Name>  …..some text….. </Tag Name> The placement of the elements must obey the HTML rules of nesting HTML documents will have a file extension  .htm  or  .html   Intro to HTML David Asirvatham
Introduction In HTML, you can have  bold  and  italicized , Larger and Smaller, or it could look  type-written, just like a word processor. HTML code uses tags for BOLD, ITALIC, etc Example: <b>bold</b> <i>italicized</i> <font size=+2>Larger</font> <font size=-2>Smaller</font> Intro to HTML David Asirvatham
Structure of HTML Document HTML files are just normal text files... they usually have the extension of .htm, .html, or .shtml.  HTML documents have two parts:   head   and   body Example <html>   <head>   <title>   Title goes here  </title>   </head>   <body> Body text goes here   </body> </html> Intro to HTML David Asirvatham
Header Headings are used within the BODY of your HTML document. You will usually use a heading to tell what the following section of your page is about.  The opening tag for a heading is  <h y > and the closing tag is </h y > with  y  being the size of the heading... from 1 to 6.   Example <h2> Introduction to HTML.[H2]   </h2>   Introduction to HTML. [H2] <h3> Lesson 3   </h3>   Lesson 3 Intro to HTML David Asirvatham
Paragraphs Example: <p>   We are the music makers, and we are the dreamers of dreams   </p> Intro to HTML David Asirvatham We are the music makers, and we are the dreamers of dreams
Text Formatting <b>   text   </b>   for  bold <i>   text   </i>   for  italics <u>   text  </u>   for  underlined <tt>   text  </tt>   for typewriter Intro to HTML David Asirvatham
Fonts Font Size   <font size=#> adjusts font size </font> Font Color <font color=?> changes font color </font> <font color=#ff0000>T</font> <font color=#ff7f00>E</font>   Intro to HTML David Asirvatham
Preformatted Text Preformatted text <pre>Dear Auntie Monkey, I'd gladly borrow some carriage returns and s p a c e s today if you let me repay you ... tomorrow.</pre>   And the display will look strikingly similar:   Dear Auntie Monkey, I'd gladly borrow some carriage returns and s p a c e s today if you let me repay you ... tomorrow.   Intro to HTML David Asirvatham
Aligning Text Aligning Text <p align=left> aligns a paragraph to the left  <p align=right> aligns a paragraph to the right  <p align=center> centers a paragraph  Intro to HTML David Asirvatham
Link HTML Link Example:   <a href=&quot;http://www.mmu.edu.my/&quot;> click here</a> And would appear in a browser like this:   Click here   Intro to HTML David Asirvatham
Image Adding/Aligning Images <img src=&quot;?&quot;> <img align=?> Example: <img align=left src=&quot;stuff/apple.gif&quot;>  Image Borders <img border=#> Example <img border=5 src=&quot;stuff/apple.gif&quot;>  Intro to HTML David Asirvatham
E-mail Link E-mail Link <a href=&quot;mailto: test@mmu.edu.my&quot;>  David</a> And the page would appear like this:   David Intro to HTML David Asirvatham
Background Background Images <body background=  =&quot;stuff/apple.gif  “> Background Color <body bgcolor=green> Intro to HTML David Asirvatham
Lists Ordered Lists <ol> creates a numbered list  <li> precedes each list item    <li> next item </ol> Unordered Lists <ul> begins an unordered list  <li> precedes each list item    <li> Next item </ul> Intro to HTML David Asirvatham
Blockquote Blockquote <blockquote> indents text on both sides </blockquote> Blockquotes are dead easy. The HTML looks like this:   <blockquote> You want the truth, huh? Last time someone asked me for the truth, I ended up on a Greyhound for Buffalo. </blockquote>  And the paragraph appears like this:   You want the truth, huh? Last time someone asked me for the truth, I ended up on a Greyhound for Buffalo.  Intro to HTML David Asirvatham
Wrapping Text Wrapping text around an image <img align=left>  aligns an image to the left side of the page  <img align=right>  aligns an image to the right side of the page  <img align=top>  aligns text along the top of an image  <img align=bottom>  aligns text along the bottom of an image <img align=middle>  aligns text to the middle of an image  Intro to HTML David Asirvatham

Lesson1 Intro to HTML

  • 1.
    Introduction to HTMLH ype r T ext M arkup L anguage Dr. David Asirvatham Multimedia University Intro to HTML David Asirvatham
  • 2.
    Basics of HTMLHTML documents are divided into elements , which are marked by tags of the form: <Tag Name> …..some text….. </Tag Name> The placement of the elements must obey the HTML rules of nesting HTML documents will have a file extension .htm or .html Intro to HTML David Asirvatham
  • 3.
    Introduction In HTML,you can have bold and italicized , Larger and Smaller, or it could look type-written, just like a word processor. HTML code uses tags for BOLD, ITALIC, etc Example: <b>bold</b> <i>italicized</i> <font size=+2>Larger</font> <font size=-2>Smaller</font> Intro to HTML David Asirvatham
  • 4.
    Structure of HTMLDocument HTML files are just normal text files... they usually have the extension of .htm, .html, or .shtml. HTML documents have two parts: head and body Example <html> <head> <title> Title goes here </title> </head> <body> Body text goes here </body> </html> Intro to HTML David Asirvatham
  • 5.
    Header Headings areused within the BODY of your HTML document. You will usually use a heading to tell what the following section of your page is about. The opening tag for a heading is <h y > and the closing tag is </h y > with y being the size of the heading... from 1 to 6. Example <h2> Introduction to HTML.[H2] </h2> Introduction to HTML. [H2] <h3> Lesson 3 </h3> Lesson 3 Intro to HTML David Asirvatham
  • 6.
    Paragraphs Example: <p> We are the music makers, and we are the dreamers of dreams </p> Intro to HTML David Asirvatham We are the music makers, and we are the dreamers of dreams
  • 7.
    Text Formatting <b> text </b> for bold <i> text </i> for italics <u> text </u> for underlined <tt> text </tt> for typewriter Intro to HTML David Asirvatham
  • 8.
    Fonts Font Size <font size=#> adjusts font size </font> Font Color <font color=?> changes font color </font> <font color=#ff0000>T</font> <font color=#ff7f00>E</font> Intro to HTML David Asirvatham
  • 9.
    Preformatted Text Preformattedtext <pre>Dear Auntie Monkey, I'd gladly borrow some carriage returns and s p a c e s today if you let me repay you ... tomorrow.</pre> And the display will look strikingly similar: Dear Auntie Monkey, I'd gladly borrow some carriage returns and s p a c e s today if you let me repay you ... tomorrow. Intro to HTML David Asirvatham
  • 10.
    Aligning Text AligningText <p align=left> aligns a paragraph to the left <p align=right> aligns a paragraph to the right <p align=center> centers a paragraph Intro to HTML David Asirvatham
  • 11.
    Link HTML LinkExample: <a href=&quot;http://www.mmu.edu.my/&quot;> click here</a> And would appear in a browser like this: Click here Intro to HTML David Asirvatham
  • 12.
    Image Adding/Aligning Images<img src=&quot;?&quot;> <img align=?> Example: <img align=left src=&quot;stuff/apple.gif&quot;> Image Borders <img border=#> Example <img border=5 src=&quot;stuff/apple.gif&quot;> Intro to HTML David Asirvatham
  • 13.
    E-mail Link E-mailLink <a href=&quot;mailto: test@mmu.edu.my&quot;> David</a> And the page would appear like this: David Intro to HTML David Asirvatham
  • 14.
    Background Background Images<body background= =&quot;stuff/apple.gif “> Background Color <body bgcolor=green> Intro to HTML David Asirvatham
  • 15.
    Lists Ordered Lists<ol> creates a numbered list <li> precedes each list item <li> next item </ol> Unordered Lists <ul> begins an unordered list <li> precedes each list item <li> Next item </ul> Intro to HTML David Asirvatham
  • 16.
    Blockquote Blockquote <blockquote>indents text on both sides </blockquote> Blockquotes are dead easy. The HTML looks like this: <blockquote> You want the truth, huh? Last time someone asked me for the truth, I ended up on a Greyhound for Buffalo. </blockquote> And the paragraph appears like this: You want the truth, huh? Last time someone asked me for the truth, I ended up on a Greyhound for Buffalo. Intro to HTML David Asirvatham
  • 17.
    Wrapping Text Wrappingtext around an image <img align=left> aligns an image to the left side of the page <img align=right> aligns an image to the right side of the page <img align=top> aligns text along the top of an image <img align=bottom> aligns text along the bottom of an image <img align=middle> aligns text to the middle of an image Intro to HTML David Asirvatham