Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Basic HTML Document

<html>
<head>
<title> Web and Database Level I </title>
</head>
<body>
<h1>This is a heading</h1>
<p>Document content goes here.....</p>
</body>
</html>
HTML Basic Tags
Heading Tags <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>
Paragraph Tag <p> </p>
Line Break Tag <br /> or <br />
HTML Comments <!-- ...-- >
HTML Tag vs. Element
<h1><i></i> </h1> an example of tag
<h1>This is <i>italic</i> heading</h1>
<p>This is <u>underlined</u> paragraph</p>
Core Attributes
Id
Title <h3 title="Hello HTML!">Titled Heading Tag Example</h3>
Class class="className1 className2 className3"
Style <p style="font-family:arial; color:#FF0000;">Some text...</p>
HTML Header Section
1 <title>, <title>HTML Title Tag Example</title>
2 <base>, <base href="http://www.tutorialspoint.com/" />
3 <link>, <link rel="stylesheet" type="text/css" href="/css/style.css" />
4 <style>, <style type="text/css">.myclass{ background-color: #aaa;padding: 10px; }</style>
5 <script>, <script type="text/JavaScript">function Hello(){alert("Hello, World"); }</script>
6 <meta>, <meta http-equiv="refresh" content="30" />
HTML Body Section Text Formatting
<p>The following word uses a <b>bold</b> typeface.</p>
<p>The following word uses a <i>italicized</i> typeface.</p>
<p>The following word uses a <u>underlined</u> typeface.</p>
<p>The following word uses a <strike>strikethrough</strike> typeface.</p>
<p>The following word uses a <tt>monospaced</tt> typeface.</p>
<p>The following word uses a <sup>superscript</sup> typeface.</p>
<p>The following word uses a <sub>subscript</sub> typeface.</p>
<p>I want to drink <del>wine</del> <ins>Fanta</ins></p>
<p>I want to drink <del>wine</del> <ins>Fanta</ins></p>
<p>The following word uses a <big>big</big> typeface.</p>
HTML Body Section Phrase Tags
<p>The following word uses a <em>emphasized</em> typeface.</p>
<p>The following word has been <mark>marked</mark> with yellow</p>
<p>The following word uses a <strong>strong</strong> typeface.</p>
<p>My best friend's name is <abbr title="Abhishek">Abhy</abbr>.</p>
<p>This chapter covers marking up text in <acronym>XHTML</acronym>.</p>
<p><bdo dir="rtl">This text will go right to left.</bdo></p>
<p>The following word is a <dfn>special</dfn> term.</p>
<p>Amit is in Spain, <q>I think I am wrong</q>.</p>
<p>Regular text. <kbd>This is inside kbd element</kbd> Regular text.</p>
<p><code>document.write("<var>user-name</var>")</code></p>
<p>Result produced by the program is <samp>Hello World!</samp></p>
<address>388A, Road No 22, Jubilee Hills – Hyderabad</address>
HTML Body Section Fonts
Set Font Size
<font size="1">Font size="1"</font><br />
<font size="2">Font size="2"</font><br />
<font size="3">Font size="3"</font><br />
<font size="4">Font size="4"</font><br />
<font size="5">Font size="5"</font><br />
<font size="6">Font size="6"</font><br />
<font size="7">Font size="7"</font>
Relative Font Size
<font size="-1">Font size="-1"</font><br />
<font size="+1">Font size="+1"</font><br />
<font size="+2">Font size="+2"</font><br />
<font size="+3">Font size="+3"</font><br />
<font size="+4">Font size="+4"</font>
HTML Background with Colors
<!-- Format 1 - Use color name -->
< body bgcolor="lime" >
<!-- Format 2 - Use hex value -->
< body bgcolor="#f1f1f1" >
<!-- Format 3 - Use color value in RGB terms -->
< body bgcolor="rgb(0,0,120)" >

HTML Background with Images


<body background="/images/html.gif">
Inserting Character Entities
 Type &#169; to display the copyright symbol:
<p> Copyright &#169; 2003 </p>
 Type &#174; to produce the registered symbol:
<p>W3C &#174;</p>
 Type &#153; to produce the trademark symbol:
<p>Alpha-Gizmo&#153;</p>
 Enter &#188; to produce the fraction one-quarter:
<p>&#188; teaspoon salt</p>
 Enter &#189; to produce the fraction one-half:
<p>&#189; teaspoon sugar</p>
 Enter &#190; to produce the fraction three-quarters:
<p>&#190; cup of honey</p>
 Enter &#162; to produce the cent symbol:
<p>10&#162;</p>
 Enter &#163; to produce the British Pound symbol:
<p>&#163;125,000</p>
 Enter &#165; to produce the Japanese Yen symbol:
<p>&#165;500,000</p>
 Enter &#8364; to produce the European Union’s Euro symbol:
<p>&#8364;700</p>
Creating HTML Lists

You might also like