JavaScript Object
Q 1. What is HTML?
HTML, which stands for HyperText Markup Language, is a standard text formatting language used to create pages on the web. HTML invented by Tim Berners-Lee in 1991. HTML5 is the most recent version of the Hypertext Markup Language.
Q 2. What are W3C and WHATWG?
The World Wide Web Consortium (W3C) is a community of developers that works towards setting a set of global standards for development. WHATWG (Web Hypertext Application Technology Working Group), was created during a W3C workshop led by Apple, Mozilla, and Opera in 2004. WHATWG is a community of developers that focuses on specifically setting HTML standards to fulfill the needs of users.
Q 3. What are entities in HTML?
HTML character entities are used to replace reserved characters in HTML. You can also replace characters that are not present on your keyboard by using entities. & £ € © ®
Q 4. How can you reduce a page’s load time?
A basic rule to optimize our page’s loading time is to reduce the download size of our elements on the web page, as well as reduce the number of HTTP requests. We can also follow some of the techniques below: File compression Re-organizing and refining code Using internal and external style sheets and minimizing inline CSS Using a CDN for media files Hosting our website’s assets on different domains while also reducing DNS lookups
Q 5. What are semantic and non-semantic elements?
Semantic elements: clearly describes its meaning to both the browser and the developer. For example: <form>, <table>, <article>, <nav>, <section>, <summary>, <time> clearly defines its content.
Non-semantic elements: <div> and <span> tells nothing about its content.
Q 6. What is the canvas element in HTML5?
The <canvas> element is a container to draw graphics on web pages using a scripting language like Python or JavaScript. The element allows for scriptable and dynamic rendering of 2D shapes and images. In canvas, there are several different approaches to drawing paths, boxes, circles, text, and more.
Q 7. What is an SVG?
SVG, which stands for Scalable Vector Graphics, is an XML based format to draw vector images. SVG images are defined with XML text files, which we can create and edit with a text editor. We can use SVG to create vector-like diagrams: pie charts, 2-dimension graphs, etc.
Q 8. What is the key difference between HTML tags and elements?
HTML tags are an essential component and define the structure and formatting of content. On the other hand, elements define a combination of a starting tag, some content (if needed), and a closing tag.
Q 9. Why Meta tags are used in HTML?
The meta tag is information about data. Metadata will not be displayed on the application, but it will be machine parsable. These elements are typically used to specify page description, keywords, page title, author name of the document, and other metadata. The metadata is used by web browsers (how to display content or reload the page), search engines (keywords), or other web services.
Q 10. What is the meaning of <!DOCTYPE>?
This is not an html tag. The <!DOCTYPE> syntax should be the first thing in the HTML page, before the <html> tag.
It is an instruction to the web browser about what version of HTML the page is written in.