CH 2 Basic of HTML and Advanced HTML
CH 2 Basic of HTML and Advanced HTML
What is HTML?
• HTML stands for Hyper Text Markup Language
• HTML is the standard markup language for creating Web pages
• HTML describes the structure of a Web page
• HTML consists of a series of elements
• HTML elements tell the browser how to display the content
• HTML elements label pieces of content such as "this is a heading",
"this is a paragraph", "this is a link", etc.
</body>
</html>
Prepared By : Mr Nirav Limbai
Example Explained
• An HTML element is defined by a start tag, some content, and an end tag:
• <tagname> Content goes here... </tagname>
• The HTML element is everything from the start tag to the end tag:
Start tag Element content End tag
<h1> My First Heading </h1>
<p> My first paragraph. </p>
<br> none none
• Some HTML elements have no content (like the <br> element). These elements
are called empty elements. Empty elements do not have an end tag!
<strong> This is a logical tag, which tells the browser that the text is important.
<small> This tag is used to decrease the font size by one unit from base font size.
Prepared By : Mr Nirav Limbai
HTML List tag
• HTML Lists are used to specify lists of information. All lists may
contain one or more list elements. There are three different types of
HTML lists:
1. Ordered List or Numbered List (ol)
2. Unordered List or Bulleted List (ul)
3. Description List or Definition List (dl)
• In HTML Unordered list, all the list items are marked with bullets.
• It is also known as bulleted list also.
• The Unordered list starts with <ul> tag and list items start with the
<li> tag.
muted muted When the page is loaded audio will be automatically muted.
• There are different types of form controls that you can use to collect
data using HTML form −
• Text Input Controls
• Checkboxes Controls
• Radio Box Controls
• Select Box Controls
• Submit and Reset Button
• Syntax:
<input type="text" />
• HTML 5 is the fifth and current version of HTML. It has improved the
markup available for documents and has introduced application
programming interfaces(API) and Document Object Model(DOM).
• The latest versions of Apple Safari, Google Chrome, Mozilla Firefox,
and Opera all support many HTML5 features and Internet Explorer 9.0
will also have support for some HTML5 functionality.
• The mobile web browsers that come pre-installed on iPhones, iPads,
and Android phones all have excellent support for HTML5.
4. An <input> element with type="email" that must <input type="email" id="email" name="email"
be in the following pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-
order: characters@characters.domain (characters z]{2,}$">
followed by an @ sign, followed by more
characters, and then a "."
After the "." sign, add at least 2 letters from a to z:
• HTML5 element <canvas> gives you an easy and powerful way to draw graphics using JavaScript.
It can be used to draw graphs, make photo compositions or do simple (and not so simple)
animations.
• There are several methods in canvas to draw paths, boxes, circles, text and add images.
• The HTML <canvas> element is used to draw graphics on a web page.
• You can easily find that <canvas> element in the DOM using getElementById() method as follows −
var canvas = document.getElementById("mycanvas");
Here is a simple <canvas> element which has only two specific attributes width and height plus all
the core HTML5 attributes like id, name and class, etc
</body>
</html>