Interview Questions Flashcards
(4 cards)
What is HTML?
HTML (hypertext markup language)
It is a markup language that consists of different tags.
It is the standard language used to create webpages and define their structure.
Basic building block of web pages, which is used to display text, images, and other content on the page
What is a markup language?
A markup language is a way to annotate/“mark up” text so that a computer (like a browser) knows how to display or interpret it.
Tells a computer: “here’s what this content is and how it should look or be organized”
Ex: HTML, XML, Markdown, LaTeX
H1 tells browser: “This is a large heading”
P tells browser: “This is a paragraph”
What are semantic elements in HTML?
Semantic elements in HTML are tags/elements that contain the meaning of the content and help define the structure/purpose of content in a meaningful way
Ex:
header —> meaning: the top section of the page
nav —> meaning: navigation links
main —> meaning: main content of the page
section —> meaning a thematic group of content
article
aside
footer
Differentiate between the inline and block elements in html
Inline:
Does not start on a new line
Only takes as much width as needed (width of content)
Can contain only text or other inline element (no block element)
Used to style or link parts of text
Height and width are usually not adjustable (can make display: inline-block)
Ex: span, a, img, strong, em, input, label
Block:
Always starts on a new line
Takes up full with available
Can contain other block and inline elements
Height and width can be set
Ex: div, p, all of heading tags (h1-h6), ul, ol, li, section