PHPGurukul

HTML Useful Tags

HTML Tags Tutorial- Headers Tag

Headers are used to organize information into hierarchical groupings.

<h1> Heading1</h1>

<h2> Heading2</h2>

<h3> Heading3</h3>

<h4> Heading4</h4>

<h5> Heading5</h5>

<h6> Heading6</h6>

Headers tags are block-level elements, meaning they take up an entire line by themselves, and no other markup is allowed in-side heading tags.

DIV

The DIV tag is one you can use to create a logical division within your document. DIVs work with css, and allow you to write CSS rules that specify how the text within the DIV should be formatted.

Images /Pictures

To add an image to your document , you use the “image” tag. To insert an image into your html document use the following syntax:

<img src="example.jpg" alt="Example">

The value that you put in the ‘src=’ attribute can either specify a graphic that is on the local file system, or you can specify a full URL which retrives the image from some-where else on the internet.

Links

A link takes a user to another place when they click on it. The link can be to a specific part of the open document or to a new page entirely.

Takes the user to a new page.

<a href="https://phpgurukul.com">PHPGurukul</a>

Takes the user to diffrent place(as indicated by the tag <a id=”top”>) in the current page :

<a href="#top">Go to top</a>

Lists

There are two kinds of lists- ordered and unordered. An ordered list is numbered such as 1,2,3, while an unordered list is a list of bullet items. There are tags to start and stop the list, and tags for each item in the list.

An ordered list start with the <ol> tag. An unordered list start with the <ul>. tag. Each list item, regardless of list type, starts with <li> tag and ends with</li>.

Ordered list Ex:

<ol>

<li>Coffee</li>

<li>Milk</li>

</ol>

Output

  1. Coffee
  2. Milk

Unordered list Ex:

<ul>

<li>Coffee</li>

<li>Milk</li>

</ul>

Output

  • Coffee
  • Milk

Anuj Kumar

This is Anuj Kumar. I’m a professional web developer with 4+ year experience. I write blogs in my free time. I love to learn new technologies and share with others.
I founded PHPGurukul in September 2015. The main aim of this website to provide PHP, Jquery, MySQL, PHP Oops and other web development tutorials.
.

Recommended Tutorials for you


Add comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.