HTML Introduction
Example of Simple HTML Document:
<!DOCTYPE html>
<html>
<head>
<title>This is a Title</title>
</head>
<body><h1>This is First Heading</h1>
<p>This is first paragraph.</p></body>
</html>
- The <!DOCTYPE html> defines this documents to be HTML5.
- Everything coming between <html> and </ html>shows a web page.
- The part between <body> and </ body> appears on the page itself.
- The <h1> element defines a first heading.
- The <p> element defines a paragraph.


HTML Version
HTML Versions
Version | Year |
---|---|
HTML | 1991 |
HTML 2.0 | 1995 |
HTML 3.2 | 1997 |
HTML 4.01 | 1999 |
XHTML | 2000 |
HTML5 | 2014 |
HTML Editors
<!DOCTYPE html>
<html>
<head>
<title>This is a Title</title>
</head>
<body><h1>This is First Heading</h1>
<p>This is first paragraph.</p></body>
</html>
Step 3: Save the HTML Pages
Save the file on your computer. Select File > Save as in the Notepad menu.
Name the file “anyname.html” and select Save as type All Files.
- The HTML documents must start with a document type declaration- <!DOCTYPE html>
- The HTML documents start with <head> and ends with </head>
- This visible part of the HTML document written between <body> and </body>
<!DOCTYPE html>
<html>
<head>
<title>This is a Title</title>
</head>
<body>
<h1>This is First Heading</h1>
<p>This is first paragraph.</p>
</body>
</html>
HTML Headings
HTML Paragraphs
- <p> This is first paragraph</p>
- <p> This is another paragraph</p>. So, you can write many paragraphs like that.
HTML Links.
<a href=”https://www.everythingingoogle.com”> This is a link </a>
HTML Image
The source file (src), alternative text (alt), width and height are provides as attributes.
Example of HTML Image.
<img src=”image.jpg” alt=”everythingingoogle.com” width=”100” height=”50”>
HTML Buttons
HTML Button defined with <button> tag.
Example of HTML Button
<button> Click Here </button>

HTML Lists
HTML lists are defined with <ul> (unordered or bullet list) or <ol> (ordered or numbered list) tags, followed by <li> tag (list items).
<ul>
<li>Blogger</li>
<li>WordPress</li>
<li>YouTube</li>
</ul>

HTML Elements


HTML Attributes
HTML link are defined with <a> tag and link address is specified in the href attributes
HTML Image are defined with <img> tag and the source of image is specified with src attributes.
Example: <img src=”image.jpg” >
Example: <img src=”image.jpg” width=”100” height=”50”>
Example: <img src=”image.jpg” alt=”everythingingoogle logo” >
The Style Attribute
The style attribute is used for styling an element like colour, font, font size etc.
Example: <p style=”color:red”> Hello friend Welcome to everything in google </p>

The lang Attribute
Language of the document can be declared in the <html> tag. The language is declared with the lang attribute.
Example:
<!DOCTYPE html>
<html lang=”en-US”>
<body>…
</body>
</html>
HTML Headings
- <h1>First Heading</h1>
- <h2>Second Heading</h2>
- <h3>Third Heading</h3>
- <h4>Fourth Heading</h4>
- <h5>Fifth Heading</h5>
- <h6>Sixth Heading</h6>
<h1 style=”font-size:100px;”>First Heading</h1>
If you want to separate content by using horizontal line then you can use <hr> tag for display horizontal line between two content.

HTML Paragraph
- <p> This is first paragraph </p>
- <p> This is second paragraph </p>
If you want to write a poem in HTML and you used <p> and </p> tag then your poem will show in a line.
Example:
<p>
Twinkle, twinkle, little star,
How I wonder what you are!
Up above the world so high,
Like a diamond in the sky.
</p>

Example

HTML Styles
HTML Style attribute
With the help of <style> attribute you can style your content like, color, font size, font, etc.
The color property defines the text color for an HTML element.
Example:
<h1 style=”color:blue;”>Everything in google</h1>
<p style=”color:red;”>Welcome to everything in google</p>

<body style=”background-color:pink;”><h1>Google</h1>
<p>Google translate.</p></body>

<h1 style=”font-family:verdana;”>Google</h1>
<p style=”font-family:courier;”>Google image.</p>
<h1 style=”font-size:200%;”>Welcome to google</h1>
<p style=”font-size:150%;”>Search anything in google</p>

<h1 style=”text-align:center;”>HTML Tutorial</h1>
<p style=”text-align:center;”>How to write HTML</p>
HTML Text formatting
- <b> – Used for Bold text.
- <strong> – Used for important text.
- <i> – used for italic text.
- <em> – Used for emphasized text.
- <mark> – Used for marked text.
- <small> – Used for small text.
- <del> – Used for deleted text.
- <ins> – Used for inserted text.
- <sub> – Used for subscript text.
- <sup> – Used for superscript text.

<i> element used for Italic text while <em> element used for emphasized text. Below in the picture you can see the difference between <i> and <em> elements.
Example:
<i> This text is italic</i> <br>
<em> This is emphasized text </em> <br>
<p> this is normal text </p>

HTML <mark> and <del> elements.
HTML <mark> element used for marked or highlighted important thing in the sentence and <del> element used for delete or removed the text.
Example:
<p> Google is a <mark> search </mark> engine </p>. Here, I marked search as an important text.
<p> At the age of 15 I like <del>milk </del> but now I like water </P>. Here I used milk as a removed text.

<sub>
element used for subscripted text. While the HTML <sup>
element used for superscripted text
HTML colors
In HTML, a color can be specified by using color name:
Example:
<!DOCTYPE html>
<html>
<body>
<h1 style=”background-color:Tomato;”>Tomato</h1>
<h1 style=”background-color:Orange;”>Orange</h1>
<h1 style=”background-color:DodgerBlue;”>DodgerBlue</h1>
<h1 style=”background-color:MediumSeaGreen;”>MediumSeaGreen</h1>
<h1 style=”background-color:Gray;”>Gray</h1>
<h1 style=”background-color:SlateBlue;”>SlateBlue</h1>
<h1 style=”background-color:Violet;”>Violet</h1>
<h1 style=”background-color:LightGray;”>LightGray</h1>
</body>
</html>




HTML Colors value
<html>
<body>
<p>color name is “Tomato”:</p>
<h1 style=”background-color:rgb(255, 99, 71);”>rgb(255, 99, 71)</h1>
<h1 style=”background-color:#ff6347;”>#ff6347</h1>
<h1 style=”background-color:hsl(9, 100%, 64%);”>hsl(9, 100%, 64%)</h1>
<p>Same color name “Tomato”, but 50% transparent:</p>
<h1 style=”background-color:rgba(255, 99, 71, 0.5);”>rgba(255, 99, 71, 0.5)</h1>
<h1 style=”background-color:hsla(9, 100%, 64%, 0.5);”>hsla(9, 100%, 64%, 0.5)</h1>
</body>
</html>

In HTML, a color can be specified as an RGB value, by using this formula:
rgb(red, green, blue)
Each parameter (red, green, and blue) defines the intensity of the color between 0 and 255.
For example, rgb(255, 0, 0) is displayed as red, because red is set to its highest value (255) and the others are set to 0.
To display the color black, all color parameters must be set to 0, like this: rgb(0, 0, 0).
To display the color white, all color parameters must be set to 255, like this: rgb(255, 255, 255).





HTML Lists

List-style-type property
Value | Description |
---|---|
disc | Sets the item list to a bullet |
circle | Sets the item list to a circle |
Square | Set the item list to a square |
none | The item list will not be marked |
write
HTML iframes
Example of iframe tag:
<!DOCTYPE html><html><body><h2>HTML Iframes with height and width</h2><p>You can use the height and width attributes to specify the size of the iframe</p><iframe src=”https://www.everythingingoogle.com” height=”200″ width=”500“></iframe></body></html>
When run this HTML then they will show like that

<html><body><h2>HTML Iframe remove border</h2><p>You can use the style property to remove border from iframe</p><iframe src=”https://www.everythingingoogle.com” height=”200″ width=”500″ style=”border:none“></iframe></body></html>

<html><body><h2>HTML Iframes target for a Link</h2><iframe src=”iframe.html” name=”iframe“></iframe><p><a href=”https://www.everythingingoogle.com” target=”iframe”>everythingingoogle</a></p></body></html>
