HTML
HTML
Ans :- HTML stands for Hyper Text Markup Language and it is the standard markup
language for creating Web pages, also describes the structure of a Web page.
2.What do you mean by a markup language?
Ans :- A markup language is a computer language that uses tags to define elements within
a document. It is human-readable, meaning markup files contain standard words, rather
than typical programming syntax.
3.Can you share examples of other markup language and how they differ from HTML?
Ans :- XML is a other markup language which means Extensible Markup Language.XML is
used for storing structured data, rather than formatting information on a page while
HTML creating webpages and HTML documents use predefined tags, XML files use
custom tags to define elements.
4.What version of HTML do you use in your projects? How is HTML 5 different from HTML 4?
Ans :- HTML 5 is use in recently projects.
Difference between HTML 4 and HTML 5 are following :
HTML 4 :
1. Lengthy Doctype declaration.
2. Many tags are not available in HTML4.
3. Difficult for developers to handle inaccurate syntax errors.
4. Multimedia supporting tags are not available.
5. <div> tag is used for separating two parts.
HTML 5 :
1. Simple Doctype declaration.
2. Comes with new HTML tags, including <audio>, <video>, <header>, <footer>,
<canvas>, <article>, and more.
3. Multimedia supporting tags are available.
4. It can handle inaccurate syntax errors
5. Does not require <div> tag.
5.What are attributes in HTML?
Ans :- Attributes provides additional information about HTML element and it is used with
HTML tag to define the characteristics of the element. e. g : <p align=”centre”
>questions</p>; In this ‘align’ is the attribute using which we will align the paragraph to
show in the centre of the view.
6.What are data-attributes good for?
Ans :- Data attributes are feature which give us to do some extra creative work with
simple HTML tags.
7.Describe the difference between <script>,<script async>and script defer>?
Ans :-
<script>=Used to define a client-side script.
<script async>=If async is present. The script is executed asynchronously with the rest of
the page (the script will be executed while the page continues the parsing).
<script defer>=The defer attribute tells the browser to only execute the script file once the
HTML document has been fully parsed.
8.Why is it generally a good idea to position CSS <link> between <head></head> and JS
<script> just before </body>? DO you know any exceptions?
Ans :- It is good idea for placing CSS between <head></head> because when a page first
loads, HTML and CSS are being parsed simultaneously; HTML creates the DOM (Document
Object Model) and CSS creates the CSSOM (CSS Object Model). Both are needed to create
the visuals in a website, allowing for a quick "first meaningful paint" timing and it also
ensures that the stylesheets are loaded and ready for use when the browser starts
rendering the page.
It is good idea for placing JS just before </body> because <script> tags block HTML parsing
while they are being downloaded and executed which can slow down the display of your
page. Placing the <script> at the bottom will allow the HTML to be parsed and displayed
to the user first.
Yes there is other many way to position of CSS it can be style using the style tag inside the
head tag and also it can be used as in inline.
Yes there is other way to position of JS Script it can also use in a head at the time of
when the script content event triggered functions or JQuery library.