You are on page 1of 22

WEB DESIGN-HTML

What is Hypertext Markup Language?


• HTML-is a set of words, symbols and rules over the
use of these words and symbols, under which web
pages are designed and displayed.
• Web pages are created using hypertext markup
language (or HTML), which is a set of special
instructions called tags or markups that specify links
to other documents, as well as how the page is
displayed.
HTML History
• HTML was invented in 1990 by a scientist called
Tim-Berners-Lee. He developed a collection of
tags that described how a document should look
when viewed in a browser. Berners-Lee’s system
of tags became known as HTML and created the
use of hyperlinks that now define the World
Wide Web.
What does HTML stand for?

•Hyper – is the opposite of linear.


•Text- is self-explanatory
•Mark-up- is what you do with the text.
•Language- is what HTML is.
• HTML is a language for describing web pages.
• HTML is a mark up language
• A mark-up language is a set of mark-up tags
• The tags describe document content
• HTML documents contain HTML tags and plain
text
• HTML documents are also called web pages
• Element – a complete tag , having an opening <tag> and a
closing </tag>
• Attribute – used to modify the value of the HTML element.
• HTML Tags
• HTML mark-up 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>
• HTML ELEMENTS
• An HTML element is everything between
the start tag and the end tag, including the
tags:
• HTML Element:
• <p>This is a paragraph</p>
Basic HTML Tags
TEXT FORMATTING TAGS IN HTML
Example:
• <html>
• <body>
• <h1>This a Heading</h1>
• <p>This is a paragraph.</p>
• <p>This is another paragraph.</p>
• </body>
• </html>
Using Line Breaks
• Line breaks-created using the <br> tags.

• Example:
• <html><head></head>
• <body>
• <p>Mc Loren Dayrit <br>Tarlac National High School-
SMC</p>
• </body>
• </html>
Horizontal Lines to Divide Sections
Paragraph Effect Example
align=(left,right,justi Aligns the line across <hr align=left
fy,center) the page width=60%>
Color=red Specifies the color <hr color=red>
of the line  

Size=”n” Specifies the <hr size=10>


thickness of the line
Width=”n” Specifies the length <hr width=60%>
of the line.
• Example:
• <html>
• <head>
• </head>
• <body>
• <p>Mc Loren Dayrit<br>
Sapang Tagalog<br>
• <hr align=center width=80% size=30 color=blue></p>
• </body>
• </html>
Formatting Text
TAG PURPOSE EXAMPLE
<i> To italicize text. <p><i>Hello World!</i></p>
<em> To emphasize text, to be displayed in <p><em> Hello World!</em></p>
italics
<pre> To display text in mono-spaced font. <p><pre> Hello World!</pre></p>
<b> To boldface text <p><b> Hello World!</b></p>
<strong> To strongly emphasize text, to be <p><strong> Hello World!
displayed in bold </strong></p>
<s> Strikethrough text <p><s> Hello World!</s></p>
<u> Underline text <p><u> Hello World!</u></p>
<sub> Defines subscripted text <p> Hello <sub> World!</sub></p>
<sup> Defines superscripted text <p> Hello <sup> World!</sup></p>
• Example:
• <html>
• <head></head><body>
• <p> <i> This text used the I tag</i><br>
• <em> This text used the em tag</em><br>
• <pre> This text used the pre tag</pre><br>
• <b> This text used the b tag</b><br>
• <strong> This text used the strong tag</strong><br>
• <s> This text used the s tag</s><br>
• <u> This text used the u tag</u><br>
• This text used the<sub> sub tag</sub><br>
• This text used the <sup>sup tag</sup><br>
</p></body></html>
Text Commands
Attribute Effect Example

Size=(size) Specifies the size of the <font size =”5”>


text
Color=(color) Specifies the color of the <font color=”blue”>
font

face =”Font value” Indicates that the font to <font face=”Georgia”>


be used in the text
Example:
<html>
<head>
</head>
<body>
<p> <font size=8> This text is size 8</font><br>
<font face="Arial">This text used Arial font</font><br>
<font color="red"> This text used red as color</font> 
</p>
</body>
</html>
HTML IMAGES
• HTML images are defined with the <img> tag.
• Example:
• <img src="Koala.jpg" width="104" height="142">
Common Attribute to the <body> tag
Attribute Effect Example

background=”url” Specifies the relative or absolute <body


location of an image file that is used as background=”c:\images\face.gif”>
a background.
Bgcolor=(color) Specifies the color of a document’s <body bgcolor=blue>
background
Bgproperties=”fixed” Indicates that the background image <body bgproperties=”fixed”>
remains displayed even if the page is
scrolled
Leftmargin=”n” Specifies the width(pixels) of the <body leftmargin=30>
margin of a white space along the left
edge of the entire document.

Scroll=(yes,no) Turn on/off scrolling of document. <body scroll=no>

Text=(color) Specifies the color of normal text <body text=green>

Top margin=”n” In pixels, specify the margin of white <body topmargin=10>


space along the top edge of the page.
• Example:
• <html>
• <head>
• </head>
• <body background=“Desert.jpg” topmargin=”10” text=white><p>
Sample text</p>
• </body>
• </html>
• Text Hyperlinks
• Hyperlinks are created using the anchor tag denoted by <a> and
</a>.This tag contain two components:
• The text(or image) that symbolizes the link
• The URL of the actual resource
• Example:
• <html>
• <head>
• </head>
• <body><p>To see more about space exploration, click <a
href=http://www.nasa.gov>NASA</a></p>
• </body>
• </html>
Using Pictures

• <html>
• <head>
• </head>
• <body><p>To see more about space exploration, click <a
href=http://www.nasa.gov><img src=”salogon.jpg” width=”80”
height=”100”> </a></p>
• </body>
• </html>

You might also like