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

HTML Interview Preparation

The document discusses various HTML tags and concepts like headings, lists, images, links and tables. It provides descriptions and examples of key HTML elements and attributes. The document also answers 25 questions related to HTML tags, attributes and their usage.

Uploaded by

180101171050
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

HTML Interview Preparation

The document discusses various HTML tags and concepts like headings, lists, images, links and tables. It provides descriptions and examples of key HTML elements and attributes. The document also answers 25 questions related to HTML tags, attributes and their usage.

Uploaded by

180101171050
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

HTML Interview Preparation

1) What is html?
Ans) HTML stands for hypertext markup language and it is a standard text formatting
language used for creating and displaying pages on internet html documents are made up of
the elements and tags that format properly and display it on pages.

2) What are html tags?


Ans) HTML tags are used for placing the elements in a proper and appropriate format tags
use the symbols greater than and less than to set them apart from the html content the html
tags need not to be closed always for example in case of images the closing tags are not
required for an image tag.

3) What are html attributes?


Ans) The attributes are the properties that can be added to an html tag that change the way
the tag behaves or displayed for example an image tag an image stack has src attribute with
which you can use the source from which you have to display the image from now the
attributes are added right after the name of the html tag inside the brackets the attributes
can only be added to opening or self-closing tags but never in closing tags.

4) What is marquee in html?


Ans) Marquee is used for scrolling text on a web page it scrolls the image or text up, down,
left or right automatically to apply for a marquee.

5) How do you separate a section of text in html?


Ans) We separate a section of text in html using the below tags which are the break tag
paragraph tag and block code the break tag is used to separate a line of text it breaks the
current line and shifts the flow of the text line to a new line followed by that we have the
paragraph line.

6) Define the types of lists in html?


Ans) Three types of lists in html which are the ordered list, unordered list and definition list
so first we'll discuss the ordered list, the ordered list uses <ol> tag and displace elements in a
numbered format next we have the unordered list the unordered list uses <ul> tag and
displays elements in a bulleted format thirdly we have the definition list the definition list
uses <dl dt and dd> tags and displays elements in the form of definition like a dictionary.

7) How do you align list of elements in an html file?


Ans) We can align the list elements in an html file by using indents if you indent each nested
list and further than the parent list then you can easily align and determine the various lists
and the elements that it contains now we have our eighth question differentiate between
ordered list and unordered list so the answer for this question i s an unordered list uses ul
tags and each element of the list is written between li tags the items are displayed as bullets
rather than numbers now coming into ordered list so for creating an ordered list you'll be
using ol tags and each element inside the list as written using li tags the list items are
displayed using numbers rather than bullet points now we have a sample on the screen right
now so the first three elements are a set of unordered lists which are represented using
bullet packs a nd the second set which is the coffee tea and milk is an ordered list which is
represented using numbers now moving ahead we have the ninth question how do you
display a table in html web page so the table and html can be created or displayed using the
table tag so it also uses to manage the layout of the page for example header section
navigation bar body content photo section etc etc so given below are a list of html tags used
for displaying table in an html webpage so we have table tr th etc etc table is used to define a
table tr is used to define a row in a table th for header td for a cell caption is used to define a
caption and we have the call group which is used to specify a group of one or more columns
in a table for formatting next we have call which is used with call group element to specify
column properties for each column next we have t body which is used to group the body
content in a table next we have t head t footer which are used for header content and footer
content respectively moving forward we have our 10th question how do you display the
given table in an html webpage so the answer for this question is written on the right side
part of my screen this is the sample code which you can use to represent or display a table
which is given in this particular format over here now followed by this we have our 11th
question how do we insert a comment in html so the answer for this question is we can
insert a comment in html by beginning with lesser than sign and ending with a greater than
sign for example as shown in the right side part of my screen which is hello world now
moving ahead we have our 12th question how do you insert a copyright symbol in html so
you can insert a copyright symbol by using ampersand copy semicolon or ampersand hashtag
169 semicolon in an html file now moving ahead we have our 13th question so what is a
white space in html so the answer for this question is an empty sequence of space characters
is called as white space in ht ml this white space is considered as a single space character in
html white space helps the browser to merge multiple spaces into one single space and so
taking care of indentation becomes easier whitespace helps in better organizing the content
and tags making them readable and easy to understand with this let's move into the 14th
question how do you create links in different sections within the same html webpage so the
answer is anchor tags we can use anchor tag along with referencing through the use of
hashtag symbol to create several links to different sections within the same web page
moving ahead we have the 15th question how do you create a hyperlink in html so the
answer is we can use anchor tag again here the same thing we can use anchor tag to create a
hyperlink within the html that links to another web page the hyperlink can be added to
images too now moving ahead into our 16th question if getting your learning started is half
the battle what if you could do that for free vi sit scale up by simply learn click on the link in
the description to know more define an image map so the answer for this question is an
image map in html helps in linking with the different kinds of web pages using this single
image it can be used for defining spaces in the images that are made part of the image
mapping process moving ahead we have our 17th question why do we use stylesheet in html
a style sheet helps in creating a well-defined template for html web page that is both
consistent as well as portable a single style sheet template can be linked to various web
pages which makes it easier to maintain and change the look of the website now the 18th
question what is semantic in html so the answer for this question is semantic html is a coding
style it is the use of html markup to reinforce the semantics or the meaning of the content
for example the semantic html b tag is not used for bold statement as well as i tag which is
not used for italic instead we use strong and em tag s now followed by the 18 question we
have our 19th question what is svg in html so the html svg is used to describe the vector or
raster graphics svg images and their behaviors are defined in xml text sheets it is mostly used
for vector type diagrams like pie charts two dimensional graphs in an x y coordinate system
now moving ahead we have our 20th question what would happen if there is no text
between the html tags so the answer for this question is really simple there would be
nothing to form at if there is no text present in between the tags therefore nothing will
appear on the screen some tags such as the tags with our closing tag like image tag do not
require any text between them now followed by the 20th question we have our next
question how do you create nested web pages in an html so nested web pages basically
mean a web page within a web page we can create nested web pages in html using the built-
in iframe tag the html live frame tag defines an inline frame for example which is displayed
on the right side part of my screen you can see the iframe source which redirects the user to
simply learns official web page now followed by that we have our 22nd question how do you
add buttons in html so we can use the built-in button tag in html to add buttons to the html
web page so on the right-hand part of my screen you can see the implementation of button
to an html web page now followed by 20 second question we have our 23rd question what
are the different types of headings in html so the answer for this question is there are
basically six types of heading tags in html which are defined with h1 to h6 tags each type of
the heading tag displays different text size from another where h1 is being the largest and h6
is being the smallest so on the right hand part of my screen you can see the implementation
of heading tags from h1 to h6 now the output for this particular code segment is the h1 h2
s3 h4 h5 h6 so you can see that h1 is being the biggest one and h6 is bein g the smallest one
now moving ahead into our 24th question how do you insert an image in the html web page
so the answer for this question is you can insert an image in the html webpage by using the
following code which is displayed on the right side part of my screen you can see we have a
image source is equals to tulip. jpeg which is used for inserting an image into your html
webpage now our 25th question what is the alt attribute in html now the answer for this
question is the alt attribute i s used for displaying the text in place of an image whenever the
image cannot be loaded due to any technical issue so basically when you have poor internet
connection and you're trying to load an image you can see some sort of text in place of an
image so that particular text is nothing but the alt attribute now moving ahead we have our
26th question how are hyperlinks inserted in the html webpage you can insert a hyperlink in
the html webpage by using the following code which is present on the right side part of my
screen you can use the anchor tag along with hedge reference and inside that particular tag
you can use the url to which you want your users to redirect to now followed by this we have
our 27th question how do you add color to the text in html so the answer for this question is
you can add color to the text by using the following code which is present on the right side
part of my screen where you can add a red color and blue color green color to this particular
paragraph an d headings now followed by 27th question we have our 28th question how do
you add css styling in html so there are three particular ways to add css to your html there
are inline css external style sheet and internal style sheet we'll discuss each of these
methods in a bit more detail first we have the inline css so it is used when less amount of
styling is needed or in cases where only a single element has to be styled to use inline styles
add the style attribute in the relevant tag now moving a head we have the external style
sheet this is used when the style is applied to many elements or html pages each page must
link to the style sheet using the link tag now we have the last one which is the internal style
sheet it is used when a single html document has a unique style and several elements need
to be styled to follow the format internal style sheet is added in the head section of the html
page by style tag now followed by this we have our 29th question what hierarchy do the style
sh eets follow the answer for this question is if a single selector includes three different style
definitions the definition that is closest to the actual tag takes precedence inline style takes
priority over embedded style sheets which takes priority over external style sheets now our
last question for the session today how do you add javascript to an html web page so the
answer for this question is we basically have three methods to add a javascript to our html
webpage they are inline script blo ck and external javascript file first we'll discuss the inline
you can add javascript to your html elements directly whenever a certain event occurs
javascript code can be added using attributes of the html tags that support it now the next
one that is the script block you can define a script block anywhere inside the html code
which will get executed as soon as the browser reaches to that part of the document this is
why script blocks are usually added at the end part of the html documents now will be
delighted to hear it from you until next time thank you stay safe and keep learning hi there if
you like this video subscribe to the simply learn youtube channel and click here to watch
similar videos turn nerd up and get certified click here"

ChatGPT

HTML stands for Hypertext Markup Language and is widely used for developing web applications
since its creation by Berners-Lee in 1991.

HTML documents consist of elements and tags, with tags using greater than and less than symbols
for proper formatting.

HTML attributes are properties added to tags to change their behavior or display, and they are placed
inside the tag brackets.

Marquee in HTML is used for scrolling text on a web page, and it requires the use of the marquee
tags.

To separate a section of text in HTML, various tags like break tag, paragraph tag, and block code tag
are used.

You might also like