HTML document are made up by html element. HTML element are return with a start tag and with an end tag, with the content in between

<tagname> Ankit </tagname>

Nested HTML Element

HTML Elements can be nested it means element can contain element

Empty HTML Element

  1. HTML element with no contain are called empty HTML element <br> is an empty element without a <closing> tag
<Html>
<Body>
<b>This is bold</b>
<i>This is statics</i>
</body>
</html>

<strike> this is striked text</strike>

<center>this will appear in center</center>

  1. The text between <head> provides the information about the documents
  2. The text between the <title> provide a title for the document
  3. The between <body> describes visible page constant

Display Header

There are hidden tags which hup to display the text as some hidden. The hider tag is denoted by h1, h2, h3, h4, h5, h6.

<strike> this is striked text</strike>

<center>this will appear in center</center>

<html>
<body>
<h1>Hello HTML</h1>
<h2> Hello Ankit</h2>
<h3> Hello Everyone</h3>
<h4> Hello You</h4>
<h5> Hello Prince</h5>
<h6> Hello Dell</h6>
</body>
</html>


Paragraph:
<p> tag used for paragraph

<html>
<body>
<p>Hello paragraph</p>
</body>
</html>

HTML Attribute

  1. Html element can have attribute
  2. Attribute provide additional information about an element
  3. Attribute are always specify in the start tag
  4. Attribute come in name / value pairs like

Name=”value”


Text Alignment

We can align the text right or of center using a <div> tag

<html>
<body>
<div align=”right”>This is Right View</div>
<div align=”left”>This is Left View</div>
<div align=”center”>This is Center View</div>
</body>
</html>

Setting the Font

We can set the font size font type and colour of the text in the web page the tags <basefont> is used for this purpose

<html>
<body>
<basefont face=”arial “size”14”colour=”red”>
This is Basefont
<br>
This is after break
</body>
</html>

Note: <fontface=”TNR” size=”10” colour=”red”>

We can set the background colour of the web page using the attribute “bgcolor”

<html>
<body bgcolor=”skyblue”>
This is background color
</body>
</html>

HTML List

 These are two type of list of html these are ordered list and unordered list

Unordered list: An unordered list start with the <ul> tag. Each list item start with the <li> tag

<ul>
<li> Ankit</li>
<li>Prince</li>
</ul>

Attribute of <ul> tag

  1. Type
  2. Style
<ul type=”disc”>
<li>Ankit</li>
<li>Prince</li>
</ul>

 

<ul style=”list-style-type”disc”>

Ordered list: The ordered list is a list of item which must follow some specific sequence

<ol>
<li>Name</li>
<li>Ankit</li>
<li>Prince</li>
</ol>

Attribute of <ol> tag

<ol start=”a”> / <ol start=”A”> / <ol start=”1”> / <ol start=”i”>
<li>Ankit</li>
<li>Prince</li>
</ol>

HTML Description Lists

The <dl> tag defines the description list, the <dt> tag defines the term (name), and the <dd> tag describes each term:

<!DOCTYPE html>
<html>
<body>
<h2>A Description List</h2>
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
</body>
</html>

Image as link

<html>
<body>
<a href =”www.apctips.com”>
<img src=”path of image”>
</a>
</body>
</html>

 

Attribute of image as link

  1. Style=”width:100px; height:200px; border:1>
  2. Width=”100” height”100”

Alt Attribute:

The alt attribute specifies and alternate text for an image, if the image cannot be display.

<html>
<body>
<p style=”color: red;font-size:25px”>Ankit Kumar</p>
<p style=”font-size:35px”>Prince Kumar</p>
<p <div align=”Center”> Friend</div></p>
</body>
</html>

HTML Link Open in New Windows

<div align=”center”>Powered by <a href=”http://www.apctips.in” target=”_blank”>APC Tips</a>
<div align=”center”>Powered by <a href=”http://www.apctips.in” target=”_blank”style=”color:#E96556″>APC Tips</a></div>

HTML Marquee tag

Html marquee is a scrolling piece of text display either horizontally across or vertically down on your web page depending on the setting. This is created by using html marquee tag

<html>
<body>
<marquee> Ankit Kumar </marquee>
</body>
</html>

 

Marquee tag Attribute

  1. Width: This specify the width of the marquee this can be a value like 10% or 20% etc.
  2. Height: This specify the height of the marquee this can be a value like 10% or 20% etc.
  3. Direction: This specify the direction in which marquee should store, this can be a value like up, down, left or right.
  4. Behaviour: This specify the type of scrolling of the marquee this can have a value like scroll, slide an alternate
  5. Scrolldelay: This specifies how long to delay between each jump. This will have a value like 10, 20 etc.
  6. Scrollamount: this specifies the speed of marquee text. This can have a value like 10, 20 etc.
  7. Loop: This specifies how many times to loop the default value is infinite. This can have value like 10, 20 etc.
  8. Bgcolor: This specifies the change of bg color of marque tag.
  9. Hspace: This specifies horizontal space around the marquee. This can have a value like 10 or 20% etc.
  10. Vspace: This specifies vertical space around the marquee. This can have a value like 10 or 10% etc.
<html>
<body>
<marquee bgcolor=orange width=200 height=20 direction=right behavior=alternate scrolldelay=5> APC Tips </marquee>
</body>
</html>

LEAVE A REPLY

Please enter your comment!
Please enter your name here