KEMBAR78
uptu web technology unit 2 html | PPTX
Web Technology
(NCS-504)
Prepared By
Mr. Abhishek Kesharwani
Assistant Professor,UCER Naini,Allahabad
HTML Text Formatting Tags
Example
<!DOCTYPE html>
<html>
<body>
<p><b>This text is bold</b></p>
<p><strong>This text is strong</strong></p>
<p><em>This text is emphasized</em></p>
<p><i>This text is italic</i></p>
<p><small>This text is small</small></p>
<p>This is<sub> subscript</sub> and
<sup>superscript</sup></p>
</body>
</html>
HTML <head>
• The <head> element is a container for all the
head elements. Elements inside <head> can
include scripts, instruct the browser where to
find style sheets, provide meta information,
and more.
• The following tags can be added to the head
section: <title>, <style>, <meta>, <link> and
<script>.
HTML head Elements
HTML Links
• Links are found in nearly all Web pages. Links
allow users to click their way from page to page.
• The HTML <a> tag defines a hyperlink.
• A hyperlink (or link) is a word, group of words, or
image that you can click on to jump to another
document.
• When you move the cursor over a link in a Web
page, the arrow will turn into a little hand.
• The most important attribute of the <a> element
is the href attribute, which indicates the link’s
destination.
HTML Links
By default, links will appear as follows in all
browsers:
• An unvisited link is underlined and blue
• A visited link is underlined and purple
• An active link is underlined and red.
<a href="url">Link text</a>
Example
<!DOCTYPE html>
<html>
<body>
<a href="http://google.com" target="new">Visit
google.com!</a>
<p>If you set the target attribute to "_blank", the
link will open in a new browser window/tab.</p>
</body>
</html>
How to use an image as a link.
<!DOCTYPE html>
<html>
<body>
<p>Create a link of an image:
<a href="default.asp">
<img src="smiley.gif" alt="HTML tutorial"
width="32" height="32"></a></p>
</body>
</html>
The HTML <title> Element
• The <title> tag defines the title of the document.
• The <title> element is required in all
HTML/XHTML documents.
The <title> element:
• defines a title in the browser toolbar
• provides a title for the page when it is added to
favorites
• displays a title for the page in search-engine
results
Example
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
HTML <link> Element
The <link> tag defines the relationship between a
document and an external resource.
The <link> tag is most used to link to style sheets:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
HTML <style> Element
The <style> tag is used to define style information for
an HTML document.
Inside the <style> element you specify how HTML
elements should render in a browser:
<head>
<style type="text/css">
body {background-color:yellow}
p {color:blue}
</style>
</head>
HTML <script> Element
The <script> tag is used to define a client-side script,
such as a JavaScript.
HTML <meta> Element
• Metadata is data (information) about data.
• The <meta> tag provides metadata about the
HTML document. Metadata will not be displayed
on the page, but will be machine parsable.
• Meta elements are typically used to specify page
description, keywords, author of the document,
last modified, and other metadata.
• The metadata can be used by browsers (how to
display content or reload page), search engines
(keywords), or other web services.
• <meta> tags always goes inside the <head>
element.
<meta> Tags - Examples
• Define keywords for search engines:
<meta name="keywords" content="HTML, CSS,
XML, XHTML, JavaScript">
• Define a description of your web page:
<meta name="description" content="Free Web
tutorials on HTML and CSS">
• Define the author of a page:
<meta name="author" content="Hege Refsnes">
• Refresh document every 30 seconds:
<meta http-equiv="refresh" content="30">

uptu web technology unit 2 html

  • 1.
    Web Technology (NCS-504) Prepared By Mr.Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad
  • 2.
  • 3.
    Example <!DOCTYPE html> <html> <body> <p><b>This textis bold</b></p> <p><strong>This text is strong</strong></p> <p><em>This text is emphasized</em></p> <p><i>This text is italic</i></p> <p><small>This text is small</small></p> <p>This is<sub> subscript</sub> and <sup>superscript</sup></p> </body> </html>
  • 4.
    HTML <head> • The<head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more. • The following tags can be added to the head section: <title>, <style>, <meta>, <link> and <script>.
  • 5.
  • 6.
    HTML Links • Linksare found in nearly all Web pages. Links allow users to click their way from page to page. • The HTML <a> tag defines a hyperlink. • A hyperlink (or link) is a word, group of words, or image that you can click on to jump to another document. • When you move the cursor over a link in a Web page, the arrow will turn into a little hand. • The most important attribute of the <a> element is the href attribute, which indicates the link’s destination.
  • 7.
    HTML Links By default,links will appear as follows in all browsers: • An unvisited link is underlined and blue • A visited link is underlined and purple • An active link is underlined and red. <a href="url">Link text</a>
  • 8.
    Example <!DOCTYPE html> <html> <body> <a href="http://google.com"target="new">Visit google.com!</a> <p>If you set the target attribute to "_blank", the link will open in a new browser window/tab.</p> </body> </html>
  • 9.
    How to usean image as a link. <!DOCTYPE html> <html> <body> <p>Create a link of an image: <a href="default.asp"> <img src="smiley.gif" alt="HTML tutorial" width="32" height="32"></a></p> </body> </html>
  • 10.
    The HTML <title>Element • The <title> tag defines the title of the document. • The <title> element is required in all HTML/XHTML documents. The <title> element: • defines a title in the browser toolbar • provides a title for the page when it is added to favorites • displays a title for the page in search-engine results
  • 11.
    Example <!DOCTYPE html> <html> <head> <title>Title ofthe document</title> </head> <body> The content of the document...... </body> </html>
  • 12.
    HTML <link> Element The<link> tag defines the relationship between a document and an external resource. The <link> tag is most used to link to style sheets: <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> HTML <style> Element The <style> tag is used to define style information for an HTML document. Inside the <style> element you specify how HTML elements should render in a browser:
  • 13.
    <head> <style type="text/css"> body {background-color:yellow} p{color:blue} </style> </head> HTML <script> Element The <script> tag is used to define a client-side script, such as a JavaScript.
  • 14.
    HTML <meta> Element •Metadata is data (information) about data. • The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable. • Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata. • The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services. • <meta> tags always goes inside the <head> element.
  • 15.
    <meta> Tags -Examples • Define keywords for search engines: <meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript"> • Define a description of your web page: <meta name="description" content="Free Web tutorials on HTML and CSS"> • Define the author of a page: <meta name="author" content="Hege Refsnes"> • Refresh document every 30 seconds: <meta http-equiv="refresh" content="30">