HTML Language B asic Tags Information : HTML language that is Hypertext Markup Language is a standard markup language that is us...
HTML Language Basic Tags Information :
HTML language that is Hypertext Markup Language is a standard markup language that is used to create a web page and web application.HTML was invented in 1990 by a scientist called Tim Berners-Lee.aN.
A Html document begin with opening<html>tag and end with closing </html> tag and is divide into two section
1.Head Section: This section contains the title of a web page.
2.Body section: The body element contains the information that you want to display on a web page.
HTML elements:
Html documents are simply a text file made up of HTML elements, these elements are called as HTML tags.
Html Tag name must be enclosed between opening and closing angle bracket<tag name>
Html tags are case sensitive and can be of two types
1. Paired: In paired tag, the first tag is called as opening tag and the second tag is called a closing tag.
the opening tag actives the effect and closing tag turns the effect off.
paired tags have three parts i.e opening tag, tag content, and closing tag example <b>text in bold</b>.
2.Singular tags: the singular tags are stand-alone tags that do not require any companion tag.
Tag Attribute:
Some HTML tag contains attribute, which provides additional information about the element.
Attribute are always specified in the start tag and come in name=value pair example<font size=28>text in size 28</font>
2.Singular tags: the singular tags are stand-alone tags that do not require any companion tag.
Tag Attribute:
Some HTML tag contains attribute, which provides additional information about the element.
Attribute are always specified in the start tag and come in name=value pair example<font size=28>text in size 28</font>
Common Html Tags:
1.Html Tag:<html>....</html>
All other html tags are nested between the <html>and</html>
All other html tags are nested between the <html>and</html>
2.Head tag:<head>..</head>
It is used for declaring the title of the HTML document.
The head tag includes a title for the document, script, style, and so on.
3.Title tag:<title>..</title>
It is used for declaring the title of the HTML document.
The head tag includes a title for the document, script, style, and so on.
3.Title tag:<title>..</title>
The title usually displayed in the browser title bar(at the top).
The title tag is used for indicating the main content section of the HTML document.
The title tag placed between the opening and closing head tag.
4.Body Tag:<body>...</body>
The body tag defines the document body.
The body tag is used for indicating the main content section of the HTML document.
The body tag contains all the content of HTML documents such as text, images, lists, tables, hyperlinks, etc.
Attributes of body tag:
The title tag is used for indicating the main content section of the HTML document.
The title tag placed between the opening and closing head tag.
4.Body Tag:<body>...</body>
The body tag defines the document body.
The body tag is used for indicating the main content section of the HTML document.
The body tag contains all the content of HTML documents such as text, images, lists, tables, hyperlinks, etc.
Attributes of body tag:
Bgcolor : specifies the background color for a web page
example <body bgcolor=gray>..</body>
Background: specifies a background image of a web page.
example<body background="path of images file">..</body>
example<body background="path of images file">..</body>
Text: specifies the color of text for a web page.
example<body text="yellow">..</body>
example<body text="yellow">..</body>
Link : specifies the color of unvisited links of a web page
example<body link=blue>..</body>
example<body link=blue>..</body>
Vlink : specifies the color of visited links of web page
example<body vlink=green>..</body>
example<body vlink=green>..</body>
Text Formatting Tags:
The HTML tags are used for formatting text are called text formatting tags.
1. <b>: The <b> tag defines bold text. Anything that appears in a <b>..<b/> elements is displayed in bold.
example: <b> Bold text <b/>
2. <i>: The content of <i> tag is usually displayed in italic
example: <i> italic text <i/>
3.<u>: The <u> tag usually results in the text being underlined. Anything appears in a <u> .. </u> is displayed with underlined
example: <u> underlined text </u>
4.<s>: Anything that appears in <s> .. </s> tag is displayed with strikethrough,which is a thin line through the text
example <s> Strike Text </s>
example <s> Strike Text </s>
5. <big>: Displays text in big font
example: <big> Text in Big Font </b>
example: <big> Text in Big Font </b>
6. <small>: Displays text in small font
example: <small> text in Small Font </small>
7. <sub>: This tag defines subscript text. Subscripted text can be used for chemical formulas like H2O
example: H<sub>2</sub>O
8. <sup>: This tag defines superscript text. Superscript text can be used to display mathematical formulas
example: 10X<sup>2</sup>+5Y<sup>3</sup>
example: 10X<sup>2</sup>+5Y<sup>3</sup>
Comment Tag: <//-->
The comment tag is used to insert comments in the source code. Comments are not displayed in the browser
example: <! Example of writing comment >
example: <! Example of writing comment >
Heading Tags:
The html <h1> to <h6> tags are used to define html heading.<h1> defines the most important heading while <h6> defines the least important heading
Heading tag has attribute "align" whose value can be left, right or center or justify
<h1> .... </h1>
<h2 align=left> ..... </h2>
<h3 align=center> .... </h3>
<h4>..... </h4>
<h5> ..... </h5>
<h6 align=right> .....</h6>
Heading tag has attribute "align" whose value can be left, right or center or justify
<h1> .... </h1>
<h2 align=left> ..... </h2>
<h3 align=center> .... </h3>
<h4>..... </h4>
<h5> ..... </h5>
<h6 align=right> .....</h6>
<p> Tag:
1.The html <p> tag is used to define a paragraph <p> tag has attribute "align" whose value can br left, right, center or justify <p> tag is a singular tag
example<p align=center> ....</p>
example<p align=center> ....</p>
<br> Tag:
The html <br> tag is used to specify line break <br> tag is a singular tag
<Center> Tag:
<center> ... </center>
The content enclosed between center tag will br aligned at center place of web page
e.g. <center> Text aligned at center </center>
The content enclosed between center tag will br aligned at center place of web page
e.g. <center> Text aligned at center </center>
<Font> Tag:
<font>....</font>
<font> tag is used to add style, size an color to the text on your site. This tag is specifies the font face, font size and font colour of text
Attributes of Font tags:
1. color: specifies color of text
2. Face: specifies the font of the text
3. Size: species the size of text
e.g. <font color=red> Text in Red Color</font>
<font color=blue face=arial size=14> Sample Text</font>
<font> tag is used to add style, size an color to the text on your site. This tag is specifies the font face, font size and font colour of text
Attributes of Font tags:
1. color: specifies color of text
2. Face: specifies the font of the text
3. Size: species the size of text
e.g. <font color=red> Text in Red Color</font>
<font color=blue face=arial size=14> Sample Text</font>
<Marquee> Tag:
A marquee tag is used to display scrolling text on a web page. Scrolling text is displayed either horizontally across or vertically down of a web page depending on the setting
Attributes of marquee tag:
Attributes of marquee tag:
- Direction: Specifies the direction of scrolling. This will have value either up, down, left or right
- Behavior: Specifies the type of scrolling. This will have value either scroll, slide and alternate
- Width: Specifies the width of marquee text. This will have value like 10 %, 20% and so on
- Bg-color: Specifies background color for marquee text
- Height: Specifies the Height of marquee text. This will have value like 10%, 20% and so on
The <abbr> tag defines an abbreviation of something. <abbr> tag shows the full version of abbreviation when mouse pointer is moved on that element.
e.g. <abbr title="World Wide Web">WWW</abbr>
<div> Tag:
The <div> element is a block-level element.
The <div> element is often used as a container for other HTML elements.
The <div> tag defines a division or a section in an HTML document.
e.g. <div style= "background-color:brown">
<h3>This is a heading</h3>
<p>This is a paragraph.</p>
</div>
Creating Hyperlink through HTML:
Hyperlinks are the primary method used to navigate between pages and Web sites. Links can point to other web pages, web sites, graphics, files, sounds, e-mail addresses, and other locations on the same web page.
When you move the mouse over a link, the mouse arrow will turn into a little hand. Hyperlinks are defined with the HTML <a> tag:
<a href="URL">linktext</a>
Example: <a href="C:\Yogesh\test.html">Click Here</a>
The href attribute specifies the destination address
The link text is the visible part (Click Here ).
Clicking on the link text will send you to the specified address.
HTML Links-The Target Attribute:
The target attribute specifies where to open the linked document.
The target attribute can have one of the following values:
1._blank _ Opens the linked document in a new window or tab
2. _self _ Opens the linked documents in the same window/tab as it was clicked (this is the default)
This example will open the linked document in a new browser window/tab as it :
<a href="assignment 1.html" target="_blank">Click Me<a>
HTML Links - Image as link:
It is common to use image as links:
<a href="default.asp">
<img src="smiley.gif" width=10% height=10%>
</a>
<a href="default.asp">
<img src="smiley.gif" width=10% height=10%>
</a>
HTML Links - Create a Bookmark:
HTML bookmarks are used to allow readers to jump to specific parts of a Web page.
Bookmarks can be useful if your web page is very long.
To make a bookmark, you must first create the bookmark, and then add a link to it. When the link clicked, the page will scroll to the location with the bookmark.
First, create a bookmark with the id attribute:
<h2 id="c4">chapter</h2>
Then ,add a link to the bookmark ("Jump to chapter-4,from within the same
<a href="#c44">Jump to chapter4</a>
HEY FRIENDS IF YOU LIKE OUR POST THEN PLEASE COMMENT AND SHARE👍
No comments