The basic HTML page looks as shown below:
< !doctype html >
< html >
< head >
< title>Basic web page < /title>
< /head>
< body>
< /body>
< /html>
- < !doctype html> : This is used to tell the browser about the version of HTML used in the document.
- < html> : This defines the root of html and wraps the code inside it.
- < head> : This tag conatins tags like < style> tag, < title> tag, Inpage css etc.
-
< body> : This tag contains the actual data that is to be displayed on a web page.
Body tag contains other tags like < div> tag, < span> tag,< p> etc.These tags are used to form the structure of the web page.HTML Heading Tags:
- < h1> < /h1>
- < h2> < /h2>
- < h3> < /h3>
- < h4> < /h4>
- < h5> < /h5>
- < h6> < /h6>
Every tag has opening tag and closing tag and within them is the text to be displayed.
These heading tags are used to define the headings of the web page according to their requirements.Paragraph Tag:
Paragraph tag is denoted by < p>(opening tag) < /p>(closing tag) and within these tags we can write the text to be displayed.
HTML Images:
In order to insert images into the webpage we can use < img> tag.
< img src="source-of-the-image" alt="alternative-text">List tags:
We have three types of lists:
- Ordered List.
- Unordered List.
- Definition List.
ORDERED LIST:
The tags used for ordered list is < ol> < /ol> and inside these tags comes list item tag denoted by < li> </ li>.
< ol> < li>One < /li> < li>Two < /li> < li>Three < /li> < /ol>
UN-ORDERED LIST:
The tags used for ordered list is < ul> < /ul> and inside these tags comes list item tag denoted by < li> </ li>.
< ul> < li>One < /li> < li>Two < /li> < li>Three < /li> < /ul>
DEFINITION LIST:
Definition list is used to display description list.
Tags used are:
< dl> <dt>Item-1</dt> <dd>Definition-1</dd> <dt>Item-2</dt> <dd>Definition-2</dd> < /dl>
< dt> : It is used to define the item to be described.
< dd> : It is used to give description about the item.
Both of these tags are wrapped inside the < dl> tag.
We will continue to understand more tags in future posts.
Top comments (0)