DEV Community

vidhya murali
vidhya murali

Posted on

HTML, CSS interview Questions

*Meta tag *

  • The tag defines metadata about an HTML document. Metadata is data (information) about data.
  • tags always go inside the element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.

Alternate for HTML
XML:
Extensible Markup Language (XML) is a markup language used for storing structured data. It uses custom tags to define the elements which support a wide range of elements. It was developed because HTML was unable to define new elements hence XML was introduced which was extensible to define custom elements.
It was designed to store and transport data and contain information about the sender, receiver, heading, and message body. It is more focused on what data is rather than how data looks. It is used for representing documents, data, transactions, invoices, etc.

Example: Implementation of the basic structure of XML code.

XHTML:
Extensible Hypertext Markup Language (XHTML) is a markup language that is used to create HTML documents that support custom tags to define new elements. It is more strict than HTML in terms of error handling i.e browser doesn't display web pages in case of errors in the markup document. It creates an XML version of the HTML document which must be marked up correctly.

Box-Sizing

CSS Box Sizing

  • The CSS box-sizing property defines how to calculate the width and height of an element: should the calculation include padding and borders, or not.
  • By default, the width and height of an element is calculated like this:
  1. - width + padding + border = actual width of an element
  2. - height + padding + border = actual height of an element This means: When you set the width/height of an element, the element often appears bigger than you have set (because the element's border and padding are added to the element's specified width/height)

Top comments (2)

Collapse
 
payilagam_135383b867ea296 profile image
Payilagam

Please add Reference links

Collapse
 
karthick_k_983555db6df3 profile image
Karthick (k)

👍🏻