0% found this document useful (0 votes)
3 views3 pages

HTML

HTML, or Hyper Text Markup Language, is the standard language used to create and display web pages, defining the structure of content through tags and attributes. It allows for the integration of various elements such as links, images, and multimedia, while being platform-independent and easy to learn. Key features include the ability to create different types of lists, the use of void elements, and the importance of Doctypes for browser compatibility.

Uploaded by

krissharma2002
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)
3 views3 pages

HTML

HTML, or Hyper Text Markup Language, is the standard language used to create and display web pages, defining the structure of content through tags and attributes. It allows for the integration of various elements such as links, images, and multimedia, while being platform-independent and easy to learn. Key features include the ability to create different types of lists, the use of void elements, and the importance of Doctypes for browser compatibility.

Uploaded by

krissharma2002
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

HTML

 What is HTML

HTML stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a standard text formatting
language which is used to create and display pages on the Web. It makes the text more interactive and dynamic. It can turn
text into images, tables, links.

HTML is a language that is interpreted by the browser and it tells the browser what to display and how to display. HTML
only defines the structure of the data that will be rendered on the browser in a webpage; to make it visually appealing and
to make it functional, we will need to use CSS and Javascript respectively.

 Hyper Text: HyperText simply means "Text within Text." A text has a link within it, is a hypertext. Whenever you click on a link
which brings you to a new webpage, you have clicked on a hypertext. HyperText is a way to link two or more web pages
(HTML documents) with each other.
 Markup language: A markup language is a computer language that is used to apply layout and formatting conventions to a
text document. Markup language makes text more interactive and dynamic. It can turn text into images, tables, links, etc.
 Web Page: A web page is a document which is commonly written in HTML and translated by a web browser. A web page can
be identified by entering an URL. A Web page can be of the static or dynamic type. With the help of HTML only, we can
create static web pages.

 What are Tags and attributes in HTML?

Tags are the primary component of the HTML that defines how the content will be structured/ formatted, whereas
Attributes are used along with the HTML tags to define the characteristics of the element. For example, <p align=”
center”>Interview questions</p>, in this the ‘align’ is the attribute using which we will align the paragraph to show in
the center of the view.
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.

HTML documents contain two things:

o content, and

o tags

When a web browser reads an HTML document, browser reads it from top to bottom and left to right. HTML tags are used
to create HTML documents and render their properties. Each HTML tags have different properties.

o All HTML tags must be enclosed within < > these brackets.

o Every tag in HTML performs different tasks. Each HTML tags have different properties

 What are Features of HTML?


o It is a very easy and simple language. It can be easily understood and modified.
o It is very easy to make an effective presentation with HTML because it has a lot of formatting tags.
o It is a markup language, so it provides a flexible way to design web pages along with the text.
o It facilitates programmers to add a link on the web pages (by html anchor tag), so it enhances the interest of browsing of the
user.
o It is platform-independent because it can be displayed on any platform like Windows, Linux, and Macintosh, etc.
o It facilitates the programmer to add Graphics, Videos, and Sound to the web pages which makes it more attractive and
interactive.
o HTML is a case-insensitive language, which means we can use tags either in lower-case or upper-case.
 What are void elements in HTML?

HTML elements which do not have closing tags or do not need to be closed are Void elements. For Example <br />,
<img />, <hr />, etc.

 What is the advantage of collapsing white space?

In HTML, a blank sequence of whitespace characters is treated as a single space character, Because the browser
collapses multiple spaces into a single space character and this helps a developer to indent lines of text without
worrying about multiple spaces and maintain readability and understandability of HTML codes.

 What are HTML Entities?

In HTML some characters are reserved like ‘<’, ‘>’, ‘/’, etc. To use these characters in our webpage we need to use the character entities
called HTML Entities. Below are a few mapping between the reserved character and its respective entity character to be used.

Character Entity Name Entity Number


< &lt; &#60;
> &gt; &#62;
& &amp; &#38;

 What are different types of lists in HTML?

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:

o Ordered list - The ordered list displays elements in numbered format. It is represented by <ol> tag.

o Unordered list - The unordered list displays elements in bulleted format. It is represented by <ul> tag.

o Definition list - The definition list displays elements in definition form like in dictionary. The <dl>, <dt> and <dd> tags
are used to define description list.

 What is the difference between HTML elements and tags?

HTML Elements: These include the opening tag, content (if any), and closing tag. Example:

Here, <p>...</p> is an element.

HTML Tags: These are just the symbols used to define elements. They are enclosed in angle brackets < >.

 What is the ‘class’ attribute in HTML?

The class attribute is used to specify the class name for an HTML element. Multiple elements in HTML can have the same class
value. Also, it is mainly used to associate the styles written in the stylesheet with the HTML elements.

 What is the difference between the ‘id’ attribute and the ‘class’ attribute of HTML elements?

Multiple elements in HTML can have the same class value, whereas a value of id attribute of one element cannot be associated
with another HTML element .

 Describe HTML layout structure.


o <header>: Stores the starting information about the web page.
o <footer>: Represents the last section of the page.
o <nav>: The navigation menu of the HTML page.
o <article>: It is a set of information.
o <section>: It is used inside the article block to define the basic structure of a page.
o <aside>: Sidebar content of the page.

 How to optimize website assets loading?


o CDN hosting - A CDN or content delivery network is geographically distributed servers to help reduce latency.
o File compression - This is a method that helps to reduce the size of an asset to reduce the data transfer
o File concatenation - This reduces the number of HTTP calls
o Minify scripts - This reduces the overall file size of js and CSS files
o Parallel downloads - Hosting assets in multiple subdomains can help to bypass the download limit of 6 assets per domain of all
modern browsers. This can be configured but most general users never modify these settings.
o Lazy Loading - Instead of loading all the assets at once, the non-critical assets can be loaded on a need basis.

 What are the different kinds of Doctypes available?


o <!DOCTYPE html> declaration before the <html> tag. It is used to inform the browser about the version of HTML used in the
document. It is called as the document type declaration (DTD).
<!DOCTYPE > is not a tag/element, it just an instruction to the browser about the document type. It is a null element which does
not contain the closing tag, and must not include any content within it.

The three kinds of Doctypes which are available:

 Strict Doctype: Enforces strict HTML rules, does not allow deprecated elements or attributes, ensuring clean and modern code.
 Transitional Doctype: Allows both modern and some deprecated HTML elements/attributes, useful for transitioning from older
versions of HTML.
 Frameset Doctype: Used for documents containing <frameset> elements instead of <body>, designed for websites using frames
(now obsolete in HTML5).

You might also like