Web Technologies Flashcards
What does CSS stand for?
CSS stands for Cascading Style Sheets.
What is the purpose of CSS?
CSS is used to specify the styles of a markup document, describing how elements should be displayed.
How is a basic CSS rule structured?
A basic CSS rule is structured as follows: selector { property-name: value; }.
What are the three ways to apply CSS styles to a document?
Inline styles, where properties are specified directly in an element’s tag.
Document-level styles, where rules are embedded within the HTML head element.
External style sheets, which are linked to the document using a <link></link> element in the head.
What does a ‘#’ (hash) indicate in CSS?
A hash indicates an ID selector, used to select a single element with a specific id attribute value.
What does a ‘.’ (dot) indicate in CSS?
A dot indicates a class selector, used to select all elements with a specific class attribute value.
Define the term “cascading” in the context of CSS.
In CSS, “cascading” refers to the way styles are applied in layers from various sources, where rules from different style sheets might overlap, and the browser assigns them different priorities.
What is the order of priority for CSS styles?
Inline styles (highest priority).
Document-level styles.
External style sheets (lowest priority).
What is SASS and what does it add to CSS?
SASS (Syntactically Awesome Style Sheets) is a preprocessor that extends CSS with features like variables, nesting, mixins, and inheritance, making CSS more powerful and maintainable.
What is Bootstrap and how is it related to CSS?
Bootstrap is a comprehensive CSS framework that incorporates SASS, along with scripting and templates, to create responsive and dynamically styled web applications.
What does HTML stand for?
HTML stands for HyperText Markup Language.
What is the primary purpose of HTML?
HTML is used to describe the structure and presentation of web documents readable by humans on the Internet.
What is a hypertext document?
A hypertext document is text containing hyperlinks to other parts of documents or different documents, which can be activated by clicking.
What are the basic components of an HTML document’s structure?
An HTML document includes elements defined by tags, attributes within those tags, and the content enclosed by the tags.
Describe the basic structure of an HTML element.
An HTML element is defined by start and end tags (e.g., <p> and </p>), with the content in between. Attributes within the start tag provide additional settings or information.
What is the purpose of the DOCTYPE declaration in HTML?
The DOCTYPE declaration is used to specify the version of HTML that the document is using, helping the browser to render the content correctly.
What kind of metadata can be included in the <head> section of an HTML document?
The <head> section can include metadata like the document’s title, character encoding, styles, scripts, and other resources linked to the document.
What is the difference between block-level and inline-level elements in HTML?
Block-level elements, like paragraphs and divs, appear on new lines and structure the main content, while inline-level elements, like hyperlinks and spans, flow within text and do not break the line.
What is the function of the <a> element in HTML?</a>
The <a> element (anchor) defines a hyperlink that links to other documents or parts of documents. It uses the href attribute to specify the link’s destination.</a>
Explain the difference between absolute and relative URLs in HTML.
Absolute URLs provide a complete path including the protocol and domain, while relative URLs specify a path relative to the current document’s location.
How can images be included in an HTML document?
Images are included using the <img></img> element, which uses the src attribute to specify the URL of the image and the alt attribute to provide a text alternative for accessibility.
What are the two types of lists in HTML and how are they defined?
HTML supports ordered lists (<ol>) and unordered lists (<ul>). Items in these lists are marked using the <li> tag.
How is a table structured in HTML?
A table in HTML is structured using the <table> element, with rows defined by <tr> tags, header cells by <th> tags, and data cells by <td> tags. Sections like the header, body, and footer of the table are grouped using <thead>, <tbody>, and <tfoot>.
What are the purposes of the <form> element in HTML?
The <form> element groups input elements where users can enter data. It uses the action attribute to specify the server endpoint receiving the form data and the method attribute to define how data is submitted (get or post).
Describe how user input can be captured in HTML.
User input in HTML can be captured through various <input></input> types, such as text, button, checkbox, and radio. Each input can have a name which is used when submitting the form.
Explain the use of character entities in HTML.
Character entities are used in HTML to display special characters that are reserved in HTML syntax, like < (<), > (>), and & (&).