24
Md. Ali Hosssain. Web Designer. Jr. Instructor, Graphic Arts Innstitute. Email:[email protected] m Phone:01731402303 06/22/22

Html class-02

Embed Size (px)

Citation preview

Page 1: Html class-02

Md. Ali Hosssain.Web Designer.Jr. Instructor, Graphic Arts Innstitute.Email:[email protected]:01731402303

04/12/23

Page 2: Html class-02

HTML Element Syntax

• An HTML element starts with a start tag / opening tag

• An HTML element ends with an end tag / closing tag

• The element content is everything between the start and the end tag

• Some HTML elements have empty content

• Empty elements are closed in the start tag

• Most HTML elements can have attributes

HTML Elements

• The <Head> element:

• The <body> element:

• The<head> element:

• The <Title> element:

• The <p> element:

• The <h1> element:

Element

04/12/23

Page 3: Html class-02

04/12/23

Page 4: Html class-02

•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"

HTML Attributes

04/12/23

Page 5: Html class-02

04/12/23

Page 6: Html class-02

HTML BODY Element<BODY attributename="attributevalue">Deprecated attributes (but still used)

BACKGROUND=“Sunset.jpg” (can be tiled)BGCOLOR=colorTEXT=“color”LINK=“color” (unvisited links)VLINK=“color” (visited links)ALINK=color (when selected)

<body alink="#336666" background="test.jpg" bgcolor="red" link="#00FF00" text="#FF0000" vlink="#00CC99">

04/12/23

Page 7: Html class-02

ColorsValues for BGCOLOR and COLOR

many are predefined (red, blue, green, ...)all colors can be specified as a six character

hexadecimal value: RRGGBBFF0000 – red888888 – gray004400 – dark greenFFFF00 – yellow000000-Black

04/12/23

Page 8: Html class-02

04/12/23

Page 9: Html class-02

<PRE> Preformatted Text

<PRE>if (a < b) { a++; b = c * d;}else { a--; b = (b-1)/2;}</PRE>

Character Use

< &lt;

> &gt;

& &amp;

" &quot;

Space &nbsp;

Special Characters

04/12/23

Page 10: Html class-02

<address>

Written by <a href="mailto:[email protected]">Kamrul</a>.<br>

Visit us at:<br>

Example.com<br>

Dhanmondi Dhaka<br>

Bangladesh

</address>

<h1>Graphics arts Institute</h1><blockquote >Graphics Arts institute is the largest arts institute In Bangladesh </blockquote>

04/12/23

Page 11: Html class-02

Physical Character Styles

<H1>Physical Character Styles</H1><B>Bold</B><BR><I>Italic</I><BR><TT>Teletype (Monospaced)</TT><BR><U>Underlined</U><BR>Subscripts: f<SUB>0</SUB> + f<SUB>1</SUB><BR>Superscripts: x<SUP>2</SUP> + y<SUP>2</SUP><BR><SMALL>Smaller</SMALL><BR><BIG>Bigger</BIG><BR><STRIKE>Strike Through</STRIKE><BR><B><I>Bold Italic</I></B><BR><BIG><TT>Big Monospaced</TT></BIG><BR><SMALL><I>Small Italic</I></SMALL><BR><FONT COLOR="GRAY">Gray</FONT><BR><DEL>Delete</DEL><BR><INS>Insert</INS><BR>

04/12/23

Page 12: Html class-02

Logical Character Styles<H1>Logical Character Styles</H1><EM>Emphasized</EM><BR><STRONG>Strongly Emphasized</STRONG><BR><CODE>Code</CODE><BR><SAMP>Sample Output</SAMP><BR><KBD>Keyboard Text</KBD><BR><DFN>Definition</DFN><BR><VAR>Variable</VAR><BR><CITE>Citation</CITE><BR><EM><CODE>Emphasized Code</CODE></EM><BR><FONT COLOR="GRAY"><CITE>Gray Citation</CITE></FONT><BR><ACRONYM TITLE="Java Development Kit">JDK Acronym</ACRONYM>

04/12/23

Page 13: Html class-02

Fonts<FONT COLOR="red" SIZE="2" FACE="Times Roman">

This is the text of line one </FONT>

<FONT COLOR="green" SIZE="4" FACE="Arial">

Line two contains this text </FONT>

<FONT COLOR="blue" SIZE="6" FACE="Courier"

The third line has this additional text </FONT>

04/12/23

Page 14: Html class-02

Unordered (Bulleted) Lists

An ordered list:

1.The first list item

2.The second list item

3.The third list item

An unordered list:

•List item

•List item

•List item

<ul>

<li>list1</li>

<li>lIST2</li>

</ul>

<ol>

<li>lIST1</li>

<li>LIST2</li>

</ol>

04/12/23

Page 15: Html class-02

Unordered (Bulleted) Lists<UL TYPE="disc"> <LI> One </LI> <LI> Two </LI> <UL TYPE="circle"> <LI> Three </LI> <LI> Four </LI> <UL TYPE="square"> <LI> Five </LI> <LI> Six </LI> </UL> </UL></UL>

<ul type="circle" type="disc" type="square">

04/12/23

Page 16: Html class-02

Ordered (Numbered) Lists<OL TYPE="1"> <LI> Item one </LI> <LI> Item two </LI> <OL TYPE="I" > <LI> Sublist item one </LI> <LI> Sublist item two </LI> <OL TYPE="i"> <LI> Sub-sublist item one </LI> <LI> Sub-sublist item two </LI> </OL> </OL></OL>

<ol type="A" type="1" type="a" type="i" type="I">04/12/23

Page 17: Html class-02

<dl><dt>Coffee</dt><dd>- black hot drink</dd><dt>Milk</dt><dd>- white cold drink</dd></dl>

HTML Description ListsA description list is a list of terms/names, with a description of each term/name.The <dl> tag defines a description list.The <dl> tag is used in conjunction with <dt> (defines terms/names) and <dd> (describes each term/name):

Milk- white cold drink

Coffee- black hot drink

04/12/23

Page 18: Html class-02

Hyperlinks

04/12/23

Page 19: Html class-02

<A> Anchors (Hyper Links)Link to an absolute URL:

If you get spam, contact <A HREF="htttp:www.microsoft.com">Microsoft </A> to report the problem.

Link to a relative URL:

See these <A HREF="#references"> references </A>concerning our fine products.

Link to a section within a URL:

Amazon provided a <A HREF="www.amazon.com/#reference">reference for our company. </A><H2> <A NAME="#references"> Our References </A> </H2>

04/12/23

Page 20: Html class-02

Hyperlinks<BODY><H3>Welcome to <A HREF="http://www.cs.virginia.edu"><STRONG>Computer Graphics</STRONG></A>at the <A HREF="www.gai.edu">Graphics Arts Instute.</A></H3></BODY>

04/12/23

Page 21: Html class-02

Images

SRC is requiredWIDTH, HEIGHT may be in units of pixels or

percentage of page or frameWIDTH="357"HEIGHT="50%"

Images scale to fit the space allowed

04/12/23

Page 22: Html class-02

Align=position Image/Text Placement

Left Image on left edge; text flows to right of image

Right Image on right edge; text flows to left

Top Image is left; words align with top of image

Bottom Image is left; words align with bottom of image

Middle Words align with middle of image

Images

04/12/23

Page 23: Html class-02

Images<BODY> <img src="dolphin.jpg" align="left" width="150" height="150" alt="dolphin jump!">

This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>This is a very cute dolphin on the left!<br>You can see text wrap around it<br>

</BODY></HTML>

04/12/23

Page 24: Html class-02

04/12/23