1 / 35

Review of Last Lesson

2004-2005 Academic Year, Spring Semester Bilkent University - Faculty of Art, Design and Architecture Department of Communication and Design CS 153 Introduction to Computing I Lesson 5. Review of Last Lesson. <html>   <head>     <title>Colors</title>   </head>   <body> HTML Colors

galvin
Download Presentation

Review of Last Lesson

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2004-2005 Academic Year, Spring SemesterBilkent University - Faculty of Art, Design and ArchitectureDepartment of Communication and DesignCS 153 Introduction to Computing ILesson 5

  2. Review of Last Lesson <html>  <head>    <title>Colors</title>  </head>  <body>HTML Colors HTML allows a wide range of colors. These colors can be represented in a hexadecimal form (called sRGB) or in a named form. Some basic color codes are: Black: #000000  Red: #FF0000 Green: #00FF00 Blue: #0000FF Yellow:#FFFF00 Aqua(Cyan): #00FFFF Fuchsia(Magenta): #FF00FF Gray: #C0C0C0 White: #FFFFFF </body> </html>

  3. Background Image Change the part of your html code to: <body background=“http://www.bilkent.edu.tr/~ussakli/images/strps.jpg”> Header tags produce different sized headings.

  4. <p> and <br> tags Use <p> and <br> tags to have paragraphs and line breaks so that your list looks tidy. Also use align parameter of <p> tag to allign some parts if you feel necessary.

  5. Seperating the text with <hr> (horizontal rule) Insert <hr> or <hr /> tag to create a horizontal rule. Try to add one or more of these parameters: • width=number / number%, • size=number, • noshade, • align=left / right / center, • color=name / #hex code for RGB

  6. Adding a entity • Add a nonbreaking space &nbsp; entity to the “HTML Colors” so that the space between HTML and Colors is larger

  7. Acronym tag We have a acronym sRGB, create a defintion for it. <acronym title=“Standard RGB">sRGB</acronym>

  8. Font Change the font of your HTML output. <font [face, color, size]> </font> Some Font Faces: • Arial • Comic Sans MS • Georgia • Times New Roman • Tahoma • Verdana Font Sizes: font size 1font size 2 font size 3 font size 4 font size 5font size 6 font size 7

  9. Font • Change the color of each sRGB value to its value.

  10. Scrolling Text (Marquee) • If you use alot: annoying. • <marquee> HTML Colors</marquee> • <marquee width=200> HTML Colors</marquee> • <marquee width=200 bgcolor="lightgreen"> HTML Colors</marquee> • <marquee width=200 bgcolor="lightgreen" direction="right"> HTML Colors</marquee> • <marquee width=100 bgcolor="lightgreen" loop=1 direction=right scrolldelay=10> HTML Colors</marquee> • <marquee width=100 bgcolor="lightgreen" loop=1 direction=right scrolldelay=10 scrollamount=10> HTML Colors</marquee> Change the values to see the effect.

  11. Marquee Parameters width=100/50% bgcolor=name/#HEX loop=number/infinite direction=left/right scrolldelay=number (number of pixels to move the text with each successive redraw) scrollamount=10 (number of milliseconds between redraws)

  12. Lists • There are 3 kinds of lists • Bulleted (Unordered) • Numbered • Definition

  13. Bulleted Lists (Unordered Lists) • <ul>...</ul> Tag defines bulleted lists. • Using type attribute you can select from • Disk bullets • Circle bullets • Square bullets • <ul> tag: initiates an unordered list. <lh> tag: is creating list header. (opt)</lh> <li> tag: each item. </li> </ul>

  14. Bulleted Lists <ul> <lh>Some basic color codes are</lh> <li>Black: <font color=#000000>#000000</font> </li> <li>Red: #FF0000 </li> <li>Green: #00FF00 </li> <li>Blue: #0000FF </li> <li>Yellow:#FFFF00 </li> <li>Aqua(Cyan): #00FFFF </li> <li>Fuchsia(Magenta): #FF00FF </li> <li>Gray: #C0C0C0</li> <li>White: #FFFFFF</li> </ul>

  15. More Levels! <li>Yellow:#FFFF00 <ul> <li><font color="#FFFF66">Light Yellow</font></li> <li><font color="#FFFFCC">Lighter Yellow</font></li> </ul> </li>

  16. Bullet Type <ul type=square> • Disk bullets: disk • Circle bullets: circle • Square bullets: square

  17. Numbered Lists (Ordered Lists) • <ol>...</ol> Tag defines numbered lists. • Using type attribute you can select from • 1 • A • a • I • i • <ol> tag: initiates an unordered list. <lh> tag: is creating list header. (opt)</lh> <li> tag: each item. </li> </ol>

  18. <ol> <lh>Some basic color codes are</lh> <li>Black: <font color=#000000>#000000</font> </li> <li>Red: #FF0000 </li> <li>Green: #00FF00 </li> <li>Blue: #0000FF </li> <li>Yellow:#FFFF00 <ol> <li><font color="#FFFF66">Light Yellow</font></li> <li><font color="#FFFFCC">Lighter Yellow</font></li> </ol> </li> <li>Aqua(Cyan): #00FFFF </li> <li>Fuchsia(Magenta): #FF00FF </li> <li>Gray: #C0C0C0</li> <li>White: #FFFFFF</li> </ol>

  19. Ordered List Types <ol type=i> • 1 • A • a • I • i

  20. Definition Lists • <dl>...</dl> creates a definition list • <dt> definition term • <dd> definition data tags

  21. Create a new file for this, do not lose old data.

  22. Definition Lists <html>   <head><title>definition list example</title></head>   <body>     Following is an example for "Definition List"     <dl>       <dt>URL</dt>       <dd>URL means Uniform Resource Locator.</dd>       <dt>HTTP</dt>       <dd>HTTP means HyperText Transfer Protocol.</dd>       <dt>FTP</dt>       <dd>FTP means File Transfer Protocol.</dd>       <dt>SMTP</dt>       <dd>SMTP means Send Mail Transfer Protocol.</dd>     </dl></body></html>

  23. You can add a list inside another <li>Yellow:#FFFF00 <ol> <li><font color="#FFFF66">Light Yellow</font></li> <li><font color="#FFFFCC">Lighter Yellow</font></li> </ol> </li> • Change the <ol> tag to <ul>

  24. Image • You can add Images to your HTML pages. • There are 2 standard graphic file formats that most browsers supports: GIF and JPG. • GIF supports 256 colors. Graphical images are best viewed in GIF file type. • JPG supports 16 million colors. Photographical images are best viewed in JPG file type.

  25. Image <img> • Download and place it to the same directory of your html document. http://www.bilkent.edu.tr/~ussakli/images/billogo.gif • Add this line to the top of your html page <img src="bilkentlogo.gif">

  26. Image Parameters • src • This attribute is required for every IMG element. It specifies a URL for the image resource • alt • This is used to provide a text description of the image and is vital for interoperability with speech-based and text only user agents. • align • This specifies how the image is positioned relative to the current textline in which it occurs: • align=top positions the top of the image with the top of the current text line. • align=middle aligns the middle of the image with the baseline for the current textline. • align=bottom is the default and aligns the bottom of the image with the baseline. • align=left floats the image to the current left margin • align=right floats the image to the current right margin • width • height • border • hspace This can be used to provide white space to the immediate left and right of the image. • vspace This can be used to provide white space above and below the image

  27. Some Examples of Image • <IMG SRC="bilkentlogo.gif" ALT="Bilkent Logo" BORDER=1> • <IMG SRC="bilkentlogo.gif" ALT="Bilkent Logo" ALIGN=“left”> • <IMG SRC="bilkentlogo.gif" ALT="Bilkent Logo" ALIGN=“left” width=50 height=50 hspace=20 vspace=20>

  28. Anchor <a> • We said, HTML allows hyperlinks, the anchor tag is what allows hyperlinking. • Two versions: • Internal hyperlink • External hyperlink

  29. Anchor <a> Parameters • Anchor parameters are • name • Name parameters allows a named anchor for internal hyperlinks • href • If href is used on an anchor the anchored text is now clickable and goes to the destination specified on href. • title • The title of anchor, mostly displayed on status bar when the mouse is over the hyperlink. • Target • Where the link is opened? • _blank: new window

  30. Anchor Internal Hyperlink <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp; </p> <p><a name=ch2>Chapter 2:</a> This is Chapter 2 content<br> </p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp; </p> <h2>Content:</h2> <p><a href=#int>Introduction</a><br> <a href=#ch1>Chapter 1</a><br> <a href=#ch2>Chapter 2</a><br> </p> <p><A name=int>Introduction:</A> This is introduction part content.<br> </p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp; </p> <p><a name=ch1>Chapter 1:</a> This is Chapter 1 content<br> </p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>

  31. Internal Hyperlink <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp; </p> <p><a href=#con>back</a> <p><a name=ch2>Chapter 2:</a> This is Chapter 2 content<br> </p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp; </p> <p><a href=#con>back</a> <h2><a name=con>Content:</a></h2> <p><a href=#int>Introduction</a><br> <a href=#ch1>Chapter 1</a><br> <a href=#ch2>Chapter 2</a><br> </p> <p><A name=int>Introduction:</A> This is introduction part content.<br> </p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp; </p> <p><a href=#con>back</a> <p><a name=ch1>Chapter 1:</a> This is Chapter 1 content<br> </p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>

  32. External Hyperlink <a href=http://www.google.com>Google</a> To open in different windows <a href=http://www.google.com target=“_blank”>Google</a> To open in same window {just give a name} <a href=http://www.google.com target=“myWindow”>Google</a> <a href=http://www.yahoo.com target=“myWindow”>Yahoo</a>

  33. Opening default Email editor • <a href="mailto:ussakli@bilkent.edu.tr"> click here to send a mail to me</a> • Well what if a user doesn’t have an email program like Outlook Express or Eudora? • This will not work.

  34. An Image Link! <a href=http://www.bilkent.edu.tr> <img src=http://www.bilkent.edu.tr/~ussakli/images/billogo.gif> </a>

  35. EOL

More Related