Basic of HTML: Name Enrollment Number
Basic of HTML: Name Enrollment Number
<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
HTML TAGS
Tags Description
1. <!DOCTYPE...> This tag defines the document type and HTML version.
2. <html> This tag encloses the complete HTML document and mainly
comprises of document header which is represented by
<head>...</head> and document body which is represented by
<body>...</body> tags.
3. <head> This tag represents the document's header which can keep other
HTML tags like <title>, <link> etc.
4. <title> The <title> tag is used inside the <head> tag to mention the
document title.
5. <body> This tag represents the document's body which keeps other HTML
tags like <h1>, <div>, <p> etc.
6. <h1> This tag represents the heading.
7. <p> This tag represents a paragraph.
HTML Tags:
An Unordered list :
-An unordered list start with the <ul> tag each list items start with the
<li> tag .
-the list items will be marked with the bullets (small black circle ) by
default .
Example :
<ul>
<li>Coffee</li>
<li>Tea</li>
</ul>
Unordered Html List choose list item
marker
The style attribute is used to define the style of the list item marker .
Value Description
An ordered list starts with the <ol> tag . Each list item starts with the
<li> tag .
the list items will be marked with the number by default .
Example :
<ol>
<li>coffee</li>
<li> tea</li>
</ol>
Ordered HTML List-The Type
Attribute
Type Description
type=“1” The list items will be numbered with
numbers (default)
type=“A” The list item will be numbered with
uppercase letters
type=“a” The list item will be numbered with
lowercase letters
type=“I” The list item will be numbered with
uppercase roman numbers
type=“i” The list item will be numbered with
lowercase roman numbers
HTML Table
Syntax :
<img src=“url” alt=“some text”>
‘src’ attribute :
‘alt’ attribute :
2. Setting width and height of Image :
The width and height attributes are used to specify
the height and width of an image. The attribute
values are specified in pixels by default.
3. Adding animated Image :
4. Adding titles to Image :
Along with the images, titles can also be added to
images to provide further information related to
the inserted image. For inserting a title, the title
attribute is used.
5. Setting a border to Image :
6. Aligning a Picture :
By default an image is aligned at the left side of
the page, but it can be aligned to center or right
using the align attribute.
7. Adding Image as a Link :
An image can work as an link with a url
embedded in it. It can be done by using the “img”
tag inside an “a” tag.
8. Using Image as a background :
More beyond basic
9. Image Maps
The <map> tag defines an image-map. An image-map is
an image with clickable areas.
HTML forms
Syntax:
<form> Form Content... </form>
Attributes: There are many attributes which are
associated with <form> tag. Some of them are
listed below:
Button
Checkbox
Radio button
Select element
Reset
Textarea
etc…
XHTML
What Is XHTML?
1. XHTML stands for
EXtensible HyperText Markup Language
2. XHTML is almost identical to HTML
3. XHTML is stricter than HTML
4. XHTML is HTML defined as an XML application
5. XHTML is supported by all major browsers
Document Structure
1. XHTML DOCTYPE is mandatory
2. The xml attribute in <html> is mandatory
3. <html>, <head>, <title>, and <body> are mandatory
XHTML Elements
1. XHTML elements must be properly nested
2. XHTML elements must always be closed
3. XHTML elements must be in lowercase
XHTML Attributes
1. Attribute names must be in lower case
2. Attribute values must be quoted
3. Attribute minimization is forbidden
How to Convert from HTML to XHTML