Introduction:
- HTML stands for Hypertext Markup language.
- It is mainly used on web to develop web pages.
- Markup language is used to mark up the text document with tags.
- <!DOCTYPE html> is the declaration tag that represents to browser that this is a html page.
- <html> is the root element.
- It contains two sections that is heading and body.
- In the head part ,we can define external links,css code and title of the page.
- In the body part,we can write the information in different ways by using html elements.
Basic Html Code:
<!DOCTYPE html>
<html>
<head>
<title>document</title>
</head>
<body>
<h1>heading</h1>
<p>paragraph</p>
</body>
</html>
Basic Tags :
Heading tags : <h1></h1>,<h2></h2>,<h3></h3>,
<h4></h4>,<h5></h5>,<h6></h6>.
paragraph tag : <p></p>.
line break tag : <br/> - it is an empty tag.
preformatted tag : <pre></pre>
Bold text : <b>
Important text : <strong>
Italic text : <i>
Important text : <strong>
Italic text : <i>
Emphasized text : <em>
Marked text : <mark>
Comment Tag:
Comment Tag:
- This tag is used to add comments to source code.
- <!-- This is a comment -->
- Html element contains starting tag followed by content followed by closing tag.
- examples : <i> italic </i> , <p>paragraph</p>.
HTML Attribute :
- Html attribute defines characteristics of an html element.
- It contains name and value.
- For example <p> tag contains attribute align="center".
- Here align is the name of attribute and values are left or center or right.
- <p align="left">this is left aligned data</p>.
Hyperlinks:
- In Html, Hyperlinks are used to navigate between web pages.
- Anchor tag is used to write hyperlinks.
- Syntax: <a href="url"></a>.
- Hyperlink reference represents that url of destination page.
- Image tag is used to insert a image in web page.
- <Img> is a empty tag.
- It contains src, alt attributes.
- Src represents url of the image.
- Alt represents description of image.
Designing a Google web page :
<span> Element: The <span> element is used to group inline elements.
<div>Element: The <div> element represents a division or section and it is often used as a container for other elements to style them with css.
<form> Element: The HTML <form> element defines a form that is used to collect information from user.
<input>Element: The <input> element can be displayed in different ways based on type attribute.
Input types 1.text
2.password
3.radio
4.date
5.email
6.number
7.file
8.checkbox
<button> Element: The HTML <button> element defines a clickable button in web page.The value of type attribute is button.we can add different styles based on requirement.