Вы находитесь на странице: 1из 5

HTML TRAINING

---------------------------

Hyper Text Markup Language

Web Technologies
--------------------
HTML : is used to design static web pages
CSS : cascading style sheets. it for styling the html
Scripting languages
-----------------------
1. Client side : JAVASCRIPT, JQUERY
2. Server side : PHP, JSP, ASP, ASP.NET
======================================================
HTML rules:
-------------
1. data written in between <> is called as Element
2. html has <!Doctype html> as the root element
it specifies we are using HTML 5
3. HTML is not case sensitive
4. elements can be nested
5. all the elements should have corresponding closing
6. when elements are nested, the rule is to close the element
which opened first at the last.
7. HTML is made up of predefined tags
8. html contains <head> element which defines the heading section
of the document. it contains many other child elements like <title>,
<script>,<style>...
9. html contains <body> element which contains the web page
contents to be viewed on the browser.
10. the html document has .html extension

Elements:
---------
a. Paired : having corresponding closing
<html>,<head>,<title>,<body>

b. Single : do not have closing


example:
<br/> or <br> : for line breaks

================================================
Heading tags
--------------
are used to emphasize a text as a heading. it has predefined
font size and they are bold. they implicitly apply line breaks.
There are 6 heading tags from <h1>,<h2>...<h6>
<h1> : being the largest font size
<h6> : being the smallest font size
=========================================
<hr> : single tag

The <hr> tag defines a thematic break in an HTML page, and is most
often displayed as a horizontal rule.
The <hr> element is used to separate content (or define a change) in
an HTML page

=====================================================
An HTML marquee is a scrolling piece of text displayed either
horizontally across or vertically down your webpage depending on the
settings. This is created by using HTML <marquees> tag.

Note - The <marquee> tag deprecated in HTML5. Do not use this element,
instead you can use JavaScript and CSS to create such effects.

Attributes of Marquee:
--------------------
1. direction : its values can be :
left(default), right, up, down

e.g. <marquee direction="right"> some text </marquee>

2. behavior : its values can be:


scroll(default), slide, alternate
e.g. <marquee behavior="slide"> some text </marquee>

3. height : its value should be given in pixels


<marquee height="30px"> some text </marquee>

4. bgcolor: to provide background color to marquee text


example:
<marquee bgcolor="yellow"> some text </marquee>

5. scrollamount : defines the speed of scrolling text


<marquee scrollamount="100"> some text </marquee>
---------------------------------------------
An attribute is used to define the characteristics of an HTML element
and is placed inside the element's opening tag. All attributes are
made up of two parts - a name and a value
=============================================
Formatting tags
----------------
1. <center> : to align the text in center
2. <b> : to display the given text in bold
3. <i> : to display the given text in italics
4. <u> : to display the given text underlined.
5. <font> : to apply font formatting to the text like
forecolor, font size, font name
it needs to have some attribute to apply the font:
a) color : to apply forecolor
b) size : to give font size (max is 7)
c) face : to give font family
(like Arial, Times New Roman)
NOTE: font is not supported in html 5. instead use CSS

NEW Semantics Formatting Tags of HTML 5:


1.<strong> - element defines strong text, with added semantic
"strong" importance
2. <em> - defines emphasized text, with added semantic importance
3. <mark> - Marked/highlighted text
4. <small> - Small text
5. <del> - Deleted text
6. <ins> - inserted text
7. <sub> - Subscript text
8. <sup> - Superscript text
======================================

The HTML <pre> element defines preformatted text.

The text inside a <pre> element is displayed in a fixed- width


font (usually Courier), and it preserves both spaces and line
breaks.
=============================================
<img> element is used to display image. it is a single element. it
needs to have attributes to display image.

attributes of img:
------------------
1. src : (important) means source of the image. specify
the image source location and the image file. if it
is in the same location as your html file, then just
specify the file name or if it is in another folder
then provide the full qualified file path.

2. alt :(important) alternate text to be displayed if the


image could not be rendered or located by the browser.

3. height : to define the height of the image


4. width : to define the width of the image
====================================================

create the following html pages with the standard


html elements(with out any body content)
---------------------------------
1. Home.html
2. Red.html : with background color Red
3. Green.html : with background color Green
4. Blue.html : with background color Blue

============================================
HTML Links - Hyperlinks
HTML links are hyperlinks.

You can click on a link and jump to another document.

When you move the mouse over a link, the mouse arrow will turn
into a little hand.

Hyperlinks are defined with the HTML <a> tag (referred as anchor
tag)
attributes of <a> tag:
-------------------------
1. href : (important) hyperlink reference. contains the
source reference. when the user clicks on the link, it
will navigate to the given reference.
e.g
<a href="https:\\www.google.com"> Google </a>
2. target : to specify where the new page is to be
opened. if the value is '_blank' it opens on
a new tab.

e.g
<a href="https:\\www.google.com" target="_blank">
Google
</a>
values of target :
a) _self :(default)opens the page on the current window
b) _blank : opens the page on the new tab window
c) _top : moves to the top linked content on the same
page
c) provide the iframe name

create a html document : MyPersonalPage.html

on this page create 3 paragraphs.


each paragraph has the following contents with
appropriate heading and formatting:

a) Heading :About Me
write some 10 lines about yourself in a paragraph

b) Heading :My Hobby


write some 10 lines about your hobby in a paragraph

c) Heading :My Friends


write some 10 lines about your friends in a paragraph

Вам также может понравиться