0% found this document useful (0 votes)
4 views

HTML Basic

Uploaded by

urithika40
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

HTML Basic

Uploaded by

urithika40
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

HTML Basic :

html - hyper text markup language


HTML is the standard markup language for creating Web pages
html is not a case sensitive

Basic tags:
<!DOCTYPE html> ----> declaration of document type
<html> ----> represent the root of element
_____________
<head> -----> collection of meta data from the document
|
<body> ------> defines the document's body.
|
(contains for all visible contents such as
headings,paragraph,images,hyperlinks,tables,list etc). |------>Nested Html
element
<h> ----------> defines large heading.(contains
<h1></h1>,..................<h6></h6> |
<p> -------> defines paragraph
_____________|

<title> -----> document title or name


<meta> ------> various kind of meta data
lang ------> define the website language

What is an HTML Element?


An HTML element is defined by a start tag, some content, and an end tag:
ex: <tagname> Content goes here... </tagname>

link tag:
<a href="url">url name</a>
where,
<a> -represent hyperlinks
href- specify the url

image tag:
<img src=" image file name" alt="image text" width="image width size" heigth="
image height size">
where,
<img> -represent the image
src -source of image file
alt -alternate text the image
width,height-->image size

website icon set element tag:


<link rel="icon" type="image/x-icon" href="/images/favicon.ico">

Empty tag:
<br> ----> line break
<hr> ----> draw the horizontal line
it does not contain the end tag or closeing tag.

HTML style.;
style: ----attribute for styling HTML elements.
syntax:
<tagname style="property:value;">

example:
<!DOCTYPE html>
<html>
<body>
<p>I am normal</p>
<p style="color:red;">I am red</p>
<p style="color:blue;">I am blue</p>
<p style="font-size:50px;">I am big</p>
</body>
</html>

background color :
---->for background color
ex:
<body>

<h1 style="background-color:powderblue;">This is a heading</h1>


<p style="background-color:tomato;">This is a paragraph.</p>

</body>

text color :
-------->-for text colors
ex:
<body>
<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>
</body>

font family:
-for text fonts
ex:
<body>
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
</body>

font size:
-for text sizes
ex:
<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>

text align:
- for text alignment
ex:
<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>

You might also like