SVKM J.V. Parekh International School: Igcse/ Grade Vii / Ict / Worksheet/29-01-2021
SVKM J.V. Parekh International School: Igcse/ Grade Vii / Ict / Worksheet/29-01-2021
What is HTML?
HTML stands for Hyper Text Markup Language, which is the most widely used
language on Web to develop web pages. HTML was created by Berners-Lee in
late 1991 but "HTML 2.0" was the first standard HTML specification which
was published in 1995.
HTML 4.01 was a major version of HTML and it was published in late 1999.
Though HTML 4.01 version is widely used but currently we are having HTML-
5 version which is an extension to HTML 4.01, and this version was published
in 2012.
Advantages of learning HTML:
• Create Web site - You can create a website or customize an existing web
template if you know HTML well.
• Become a web designer - If you want to start a carrer as a professional
web designer, HTML and CSS designing is a must skill.
• Understand web - If you want to optimize your website, to boost its speed
and performance, it is good to know HTML to yield best results.
• Learn other languages - Once you understands the basic of HTML then
other related technologies like javascript, php, or angular are become
easier to understand.
Applications of HTML
• Web pages development - HTML is used to create pages which are
rendered over the web. Almost every page of web is having html tags in
it to render its details in browser.
• Internet Navigation - HTML provides tags which are used to navigate
from one page to another and is heavily used in internet navigation.
• Responsive UI - HTML pages now-a-days works well on all platform,
mobile, tabs, desktop or laptops owing to responsive design strategy.
<head>
<title>This is document title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>Document content goes here.....</p>
</body>
</html>
HTML Tags
HTML is a mark-up language and makes use of various tags to format the
content.
These tags are enclosed within angle braces <Tag Name>.
Except few tags, most of the tags have their corresponding closing tags.
For example, <html> has its closing tag </html> and <body> tag has its
closing tag </body> tag etc.
Above example of HTML document uses the following tags –
Heading Tags
Any document starts with a heading. You can use different sizes for your
headings. HTML also has six levels of headings, which use the elements <h1>,
<h2>, <h3>, <h4>, <h5>, and <h6>. While displaying any heading, browser
adds one line before and one line after that heading.
<!DOCTYPE html>
<html>
<head>
<title>Heading Example</title>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
Output:
<head>
<title>HTML head Tag</title>
</head>
<body>
actual content goes here
</body>
</html>
<head>
<title>Title comes here</title>
</head>
<body>
<p>title tag is used for indicating the title of the HTML
document. HTML document
title is visible via browser’s title bar.</p>
</body>
</html>
Output:
HTML - Comments
Comment is a piece of code which is ignored by any web browser.
It is a good practice to add comments into your HTML code, especially in
complex documents, to indicate sections of a document, and any other notes to
anyone looking at the code.
Comments help you and others understand your code and increases code
readability.
HTML comments are placed in between <!-- ... --> tags. So, any content placed
with-in <!-- ... --> tags will be treated as comment and will be completely
ignored by the browser.
<!DOCTYPE html>
<html>
<body>
<p>Document content goes here.....</p>
</body>
</html>
Example:
The src Attribute
The <img> tag is used to embed an image in an HTML page. The src attribute
specifies the path to the image to be displayed:
<img src="img_girl.jpg">
The <img> tag should also contain the width and height attributes, which
specifies the width and height of the image (in pixels):
HTML Paragraphs
A paragraph always starts on a new line, and is usually a block of text.
The HTML <p> element defines a paragraph.
A paragraph always starts on a new line, and browsers automatically add some
white space (a margin) before and after a paragraph.
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
HTML Images
Images can improve the design and the appearance of a web page.
The HTML <img> tag is used to embed an image in a web page.
Images are not technically inserted into a web page; images are linked to web
pages. The <img> tag creates a holding space for the referenced image.