2004-2005 Academic Year, Spring Semester 2004-2005 Academic Year, Spring Semester Bilkent University - Faculty of Art, Bilkent University - Faculty of Art, Design and Architecture Design and Architecture Department of Communication and Design Department of Communication and Design CS 153 CS 153 Introduction to Introduction to Computing I Computing I Lesson 4 Lesson 4
28
Embed
2004-2005 Academic Year, Spring Semester Bilkent University - Faculty of Art, Design and Architecture Department of Communication and Design CS 153 Introduction.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
2004-2005 Academic Year, Spring Semester2004-2005 Academic Year, Spring SemesterBilkent University - Faculty of Art, Design and Bilkent University - Faculty of Art, Design and
ArchitectureArchitectureDepartment of Communication and DesignDepartment of Communication and Design
CS 153 Introduction CS 153 Introduction
to Computing Ito Computing I Lesson 4Lesson 4
Review of Last LessonReview of Last Lesson<html><html>
<head> <head> <title>MUSIC</title> <title>MUSIC</title> </head> </head> <body> <body>WELCOME TO MY MUSIC PAGE WELCOME TO MY MUSIC PAGE This page is about pop music. I will list here my favorite This page is about pop music. I will list here my favorite singers and songs.singers and songs.My Favorite Singers:My Favorite Singers:StingStingDire StraitsDire StraitsGippsy KingsGippsy KingsMy Favorite Songs:My Favorite Songs:FragileFragileYour latest trickYour latest trickPharonPharon</body></body>
</html></html>
• Any HTML file starts with <html> and ends with </html>
• <title>...</title> is the title of the page and given in <head>...</head> part
• <body> ... </body> contains the information which will be displayed in the page
Header TagsHeader Tags
Change the part of your html code to:Change the part of your html code to:
<h2>WELCOME TO MY MUSIC <h2>WELCOME TO MY MUSIC PAGE </h2> PAGE </h2>
Header tags produce different sized headings.
<p> and <br> tags <p> and <br> tags
Change the part of your html code to:Change the part of your html code to:<p>My Favorite Singers:<br><p>My Favorite Singers:<br>Sting<br>Sting<br>Dire Straits<br>Dire Straits<br>Gippsy Kings<br>Gippsy Kings<br><p>My Favorite Songs:<br><p>My Favorite Songs:<br>Fragile<br>Fragile<br>Your latest trick<br>Your latest trick<br>Pharon<br>Pharon<br>
<br> tag starts a new line.<p> tag skips a line then starts a paragraph.
TAG ATTRIBUTE <p TAG ATTRIBUTE <p
align=center> <p>align=center> <p>
Change the part of your html code to:Change the part of your html code to:
Any color can be given in two ways:Any color can be given in two ways:
1.1. By name; like "pink", "blue", "green", etc.By name; like "pink", "blue", "green", etc.
2.2. By Hexadecimal codes: Hexadecimal is a By Hexadecimal codes: Hexadecimal is a number system that has 16 numbers(base16-number system that has 16 numbers(base16-0123456789ABCDEF). 0123456789ABCDEF).
1.1. Different colors are formed by the combination of Different colors are formed by the combination of Red, Green, Blue. Such code will look like Red, Green, Blue. Such code will look like "#19A8FE". "#19A8FE".
2.2. "#000000" is black, "#FFFFFF" is white, "#000000" is black, "#FFFFFF" is white, "#FF0000" is red, "#00FF00" is green, "#0000FF" "#FF0000" is red, "#00FF00" is green, "#0000FF" is blue.is blue.
Changing the body text Changing the body text colorcolor
Change the part of your html code to:Change the part of your html code to:
<body text="#0000FF"> <body text="#0000FF">
Seperating the text with Seperating the text with <hr> (horizontal rule)<hr> (horizontal rule)
hr is an empty tag.hr is an empty tag.
Change the part of your html code to:Change the part of your html code to:
<hr> or <hr /><hr> or <hr />
width=number / number%, size=number, noshade, align=left / right / center, color=name / #hex code for RGB
Physical Style: <b> Physical Style: <b>
Change the part of your html code to:Change the part of your html code to:
b tag changes the appearance of the enclosed text to bold.Note: In the nested usage of the tags, any opening and closing tag pair shouldn't cross the other pairs.
Physical Style: <i> Physical Style: <i>
Change the part of your html code to:Change the part of your html code to:
<i>Fragile</i> <i>Fragile</i>
i tag changes the appearance of the enclosed text to italic.
Physical Style: <u> Physical Style: <u>
Change the part of your html code to:Change the part of your html code to:
<u>Your latest trick</u> <u>Your latest trick</u>
Physical Style: <sub> Physical Style: <sub>
Add to your html code:Add to your html code:
<p>H<sub>2</sub>O <p>H<sub>2</sub>O
SUB tag changes the appearance of the enclosed text to subscript.
Physical Style: <sup> Physical Style: <sup>
Add to your html code:Add to your html code:
<p>10<sup>o</sup>C <p>10<sup>o</sup>C
SUP tag changes the appearance of the enclosed text to superscript.
Physical Style: <tt> Physical Style: <tt>
Add to the end of your html code:Add to the end of your html code:
<tt>OTHER GROUPS</tt><tt>OTHER GROUPS</tt>
TT tag is the type writer font.
Logical Styles: Logical Styles:
<em>...</em> = Emphasis<em>...</em> = Emphasis<strong>...</strong> = Stronger emphasis<strong>...</strong> = Stronger emphasis<code>...</code> = Display an HTML <code>...</code> = Display an HTML
directivedirective<samp>...</samp> = Include sample output<samp>...</samp> = Include sample output<kbd>...</kbd> = Display a keyboard key<kbd>...</kbd> = Display a keyboard key<var>...</var> = Define a variable<var>...</var> = Define a variable<dfn>...</dfn> = Display a definition (not <dfn>...</dfn> = Display a definition (not
widely supported)widely supported)<cite>...</cite> = Display a citation <cite>...</cite> = Display a citation
Text Elements: <pre>, Text Elements: <pre>, <listing> <listing>
Add to the end of your html code:Add to the end of your html code:
<pre><pre> G r o u p C D G r o u p C D Era Era Era Era Santana Santana SmoothSmooth Bueno Vista Social Club Bueno Vista Social Club Chan ChanChan Chan</pre> </pre>
PRE tag tells that text is already formatted, it must be displayed as it is. Permits some tags inside.LISTING tag does the same except it doesn't run the tags inside.
<blockquote><blockquote> <blockquote><blockquote>
Write this and copy over and over again. Write Write this and copy over and over again. Write this and copy over and over again. Write this this and copy over and over again. Write this and copy over and over again. Write this and and copy over and over again. Write this and copy over and over again. Write this and copy copy over and over again. Write this and copy over and over again. Write this and copy over over and over again. Write this and copy over and over again. Write this and copy over and and over again. Write this and copy over and over again. Write this and copy over and over over again. Write this and copy over and over again. Write this and copy over and over again. again. Write this and copy over and over again. Write this and copy over and over again. Write Write this and copy over and over again. Write this and copy over and over again. Write this this and copy over and over again. Write this and copy over and over again. and copy over and over again. </blockquote></blockquote>
&keyword;&keyword;Display a particular character identified by a Display a particular character identified by a special keyword. special keyword. For example:For example:
the entity < specifies the less than ( < ) character. the entity < specifies the less than ( < ) character. Note that the semicolon following the keyword is requiredNote that the semicolon following the keyword is required
&#ascii_equivalent;&#ascii_equivalent;Use a character literally. Use a character literally. For example For example
the entity %specifies (%) character. the entity %specifies (%) character. Again note that the semicolon following the ASCII numeric Again note that the semicolon following the ASCII numeric
value is required. value is required.
EntityEntity
A character entity has three parts: A character entity has three parts: an ampersand (&), an ampersand (&),
an entity name or an entity name or a # and an entity number, a # and an entity number,
and finally a semicolon (;). and finally a semicolon (;). The most common character entity in The most common character entity in
HTML is the non-breaking space. HTML is the non-breaking space. Normally HTML will truncate spaces Normally HTML will truncate spaces in your text. To add spaces to your in your text. To add spaces to your text, use the character entity text, use the character entity
EntityEntity
Add to your html code:Add to your html code:
This is a text.This is a text.
This This is a text. is a text.
FontFont
Add to your html code:Add to your html code:
<font face="arial, verdana, comic <font face="arial, verdana, comic sans ms" size=10 color="green"> sans ms" size=10 color="green"> New Age Groups</font>New Age Groups</font>
Some ExercisesSome Exercises
Exercise 1Exercise 1
The address of background image is http://www.bilkent.edu.tr/~ussakli/images/fl1.gif
<h1>Welcome to my Clemantis page.</h1><h1>Welcome to my Clemantis page.</h1><p>I would love to give some information about <p>I would love to give some information about
<b>clemantis</b>.</p><b>clemantis</b>.</p><h2>Where we can find information about clemantis flowers?<h2>Where we can find information about clemantis flowers?
</h2></h2><p>There are several web sites about clemantis, first of all you <p>There are several web sites about clemantis, first of all you
should check <big>International Clematis Society</big>.should check <big>International Clematis Society</big>.</body></body></html></html>
Exercise 2Exercise 2
SolutionSolution<html><html><head><head><title>Definition of Information</title><title>Definition of Information</title></head></head><body bgcolor=black text=white><body bgcolor=black text=white><h1>Welcome!</h1><h1>Welcome!</h1><p>So what is <b>information</b>?</p><p>So what is <b>information</b>?</p><h2>A definition</h2><h2>A definition</h2><p><tt>Any communication or representation of knowledge such as <p><tt>Any communication or representation of knowledge such as
<u>facts</u>, <u>data</u>, or <u>opinions</u>, in <i>any</i> <u>facts</u>, <u>data</u>, or <u>opinions</u>, in <i>any</i> medium or form, including textual, numerical, graphic, cartographic, medium or form, including textual, numerical, graphic, cartographic, narrative, or audio-visual forms.</tt></p>narrative, or audio-visual forms.</tt></p>
<h2>Yet another definition</h2><h2>Yet another definition</h2><p><p>We can also define information as:<br>We can also define information as:<br>The meaning that a human extracts from data by means of known The meaning that a human extracts from data by means of known
conventions of the representation used." (Gould, 1971).</p>conventions of the representation used." (Gould, 1971).</p></body></body></html></html>