0% found this document useful (0 votes)
44 views

Define HTML

HTML tags define how web browsers format and display content. Tags contain opening and closing brackets (<tag>content</tag>) and perform specific tasks like breaking lines (<br>) or adding horizontal rules (<hr>). HTML code structure consists of tags like <html>, <head>, <body> that make up page elements. The <body> tag contains all document content and has only one instance. The <img> tag displays images and requires 'src' and 'alt' attributes. Superscript and subscript can be added using <sup> and <sub> tags respectively. Formatting tags like <b>, <i>, <u> style text and tags like <form> collect data from users.

Uploaded by

atul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Define HTML

HTML tags define how web browsers format and display content. Tags contain opening and closing brackets (<tag>content</tag>) and perform specific tasks like breaking lines (<br>) or adding horizontal rules (<hr>). HTML code structure consists of tags like <html>, <head>, <body> that make up page elements. The <body> tag contains all document content and has only one instance. The <img> tag displays images and requires 'src' and 'alt' attributes. Superscript and subscript can be added using <sup> and <sub> tags respectively. Formatting tags like <b>, <i>, <u> style text and tags like <form> collect data from users.

Uploaded by

atul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. Define html tags.

 HTML tags are like keywords which defines that how web browser will format and
display the content. With the help of tags, a web browser can distinguish between
an HTML content and a simple content. HTML tags contain three main parts:
opening tag, content and closing tag. But some HTML tags are unclosed tags.

 All HTML tags must enclosed within < > these brackets.
 Every tag in HTML perform different tasks.
 If you have used an open tag <tag>, then you must use a close tag </tag>
(except some tags).

Syntax
 <tag> content </tag>

Unclosed HTML Tags


Some HTML tags are not closed, for example br and hr.

<br> Tag: br stands for break line, it breaks the line of the code.

<hr> Tag: hr stands for Horizontal Rule. This tag is used to put a line across
the webpage.

2.what is the structure of html code?

The HTML code starts with HTML5 DOCTYPE declaration and is written in the
form of HTML elements that consist of HTML tags. Every tag consists of a keyword
enclosed in angle brackets. For example, <html>, <head>, <body>, <title>, <h1>,
<p>, etc.

3.Explain body and its attribute?

The <body> tag defines the document's body.

The <body> element contains all the contents of an HTML document, such as


headings, paragraphs, images, hyperlinks, tables, lists, etc.

Note: There can only be one <body> element in an HTML document.

4.Explain img tags and its attribute?

The <img> tag has two required attributes: src - Specifies the path to the image. alt -
Specifies an alternate text for the image, if the image for some reason cannot be
displayed.
5. <sub> and <sup> ?

superscript (24) and subscript(24)

6.Explain formatting tags.?

Through text formatting tags in HTML, we can make our content more attractive.
Text formatting tags in HTML give us the freedom to italicize, underline or make our
text bold just like in MS word. We can also write mathematical and chemical formulas
using HTML text formatting tags.

There are various types of formatting tags available to us through


which we can write texts in different styles and formats. Different types of
formatting tags are:

Bold tag <b>

Italic tag <i>

Underline tag<u>

Mark tag <mark>

Strike tag <strike> in html5 <s> eg- abcdef

Monospace tag <tt> not available in html5

Subscript tag <sub>

Superscript tag <sup>

Delete and Insert tag <del> <ins>

Big and Small tag <small> <big>

7. write about forms and explain all option of forms .

HTML forms are required if you want to collect some data from of the site visitor.
An HTML form is a section of a document which contains controls such as text fields,
password fields, checkboxes, radio buttons, submit button, menus etc.

<form action="server url" method="get|post">

//input controls e.g. textfield, textarea, radiobutton, button

</form>
8.

You might also like