Made with ScholarlyMake flashcards like these from your own notes
Question:What is the primary role of HTML in modern web pages?
Answer:Indicates elements to include and their order
Question:How does CSS complement HTML in web development?
Answer:Styles and formats HTML elements
Question:What is the purpose of JavaScript in webpages?
Answer:Manipulates elements programmatically and responds to user actions
Question:What is a markup language?
Answer:Language with parts rendered and parts instructing interpretation
Question:What does 'rendering' mean in the context of HTML?
Answer:Transforming HTML text into visual representation
Question:How are HTML elements typically demarcated?
Answer:Using opening and closing tags like ...
Question:What is the purpose of the tag in HTML?
Answer:Delimits paragraphs
Question:How can elements be nested in HTML?
Answer:One element inside another, like text
Question:What are attributes in HTML elements?
Answer:Qualifiers providing additional information, like style='color:red'
Question:What is the latest version of HTML mentioned?
Answer:HTML 5
Question:What is a document type declaration in HTML?
Answer:Starts document, like <!DOCTYPE html>
Question:What is the role of the element?
Answer:Contains metadata like
Question:What is the purpose of the element?
Answer:Contains visible content
Question:How are comments added in HTML?
Answer:Using <!-- comment -->
Question:What does the lang attribute in do?
Answer:Specifies language for accessibility and search engines
Question:Why does HTML largely ignore carriage returns?
Answer:To focus on structural markup over formatting
Question:How is a line break inserted in HTML?
Answer:Using tag
Question:What happens to leading and trailing spaces in HTML?
Answer:Typically ignored
Question:How are multiple spaces preserved in HTML?
Answer:Using non-breaking space
Question:What is a thematic break line in HTML?
Answer:tag for horizontal rule
Question:How are comments structured in HTML?
Answer:<!-- comment text --> ignoring line breaks inside
Question:Why is the ampersand (&) special in HTML?
Answer:Used to mark up special characters
Question:What is the HTML code for ampersand?
Answer:&
Question:What is a non-breaking space in HTML?
Answer: prevents line breaks
Question:HTML code for less than sign?
Answer:<
Question:HTML code for greater than sign?
Answer:>
Question:HTML code for quotation mark?
Answer:"
Question:HTML code for apostrophe?
Answer:'
Question:What is the structure of a hyperlink in HTML?
Answer:text
Question:What can the visible text in a hyperlink contain?
Answer:HTML elements like images or formatted text
Question:What does a relative href like 'Pages/file.pdf' mean?
Answer:Path relative to current directory
Question:What is the element used for?
Answer:Groups navigation hyperlinks
Question:What are the basic building blocks of HTML?
Answer:Elements or tags
Question:How is text formatting generally done in HTML?
Answer:Using CSS or inline style attributes
Question:What is the purpose of the element?
Answer:Contact information for document author
Question:What does the element do?
Answer:Bold text
Question:Purpose of element?
Answer:Quoted section from another source
Question:What is used for?
Answer:Title of a work
Question:element purpose?
Answer:Piece of computer code
Question:What indicates deleted text in HTML?
Answer:element
Question:element usage?
Answer:Defining instance of a term
Question:Purpose of element?
Answer:Emphasized text, often italicized
Question:What is for?
Answer:Footer for document or section
Question:Hierarchy of heading elements?
Answer:to for levels
Question:element role?
Answer:Header for document or section
Question:What does element indicate?
Answer:Text in alternate voice or mood
Question:element purpose?
Answer:Indicates added text
Question:for what?
Answer:Keyboard input
Question:Purpose of element?
Answer:Highlighted text
Question:element characteristics?
Answer:Preformatted text preserving spaces and breaks
Question:for short quotations?
Answer:Yes, adds quotes automatically
Question:element meaning?
Answer:No longer accurate text
Question:purpose?
Answer:Sample program output
Question:for smaller text?
Answer:Yes, like fine print
Question:element role?
Answer:Important text, often bold
Question:for subscript?
Answer:Yes, like H2O
Question:usage?
Answer:Heading for element
Question:for superscript?
Answer:Yes, like x²
Question:element purpose?
Answer:Date or time
Question:for underlined text?
Answer:Stylistically different text
Question:element?
Answer:Variable in math or code
Question:purpose?
Answer:Possible line-break opportunity
Question:Which HTML elements are deprecated in HTML5?
Answer:, , , ,
Question:Purpose of element?
Answer:Abbreviation with title attribute
Question:element role?
Answer:Links content to machine-readable value
Question:What is for?
Answer:Self-contained article
Question:element usage?
Answer:Content aside from main page
Question:purpose?
Answer:User-toggleable additional details
Question:role?
Answer:Generic section container
Question:element?
Answer:Main content of document
Question:default spacing?
Answer:Space above and below
Question:for what?
Answer:Thematic grouping in document
Question:purpose?
Answer:Inline generic container
Question:What causes inconsistencies in browser rendering?
Answer:Evolving standards and device variations
Question:What is browser detection?
Answer:Identifying browser type/version for compatibility
Question:Why is feature detection preferred over browser detection?
Answer:Focuses on capabilities, not browser identity
Question:How do and support multiple formats?
Answer:Multiple elements, browser picks supported
Question:What is the CSS @media rule for?
Answer:Apply styles based on device characteristics
Question:How is feature detection done in JavaScript?
Answer:Check for objects, properties, or try creation
Question:What is the primary role of CSS in web pages?
Answer:Styles HTML elements
Question:Ways to include CSS in HTML?
Answer:Inline, in-file , external
Question:How can JavaScript alter CSS?
Answer:Modify style attributes on the fly
Question:CSS precedence hierarchy?
Answer:JS > inline > in-file > external, later overrides earlier
Question:Where should elements go in HTML5?
Answer:Anywhere, but traditionally in
Question:What is a CSS rule-set?
Answer:Selector { declarations }
Question:What is a CSS declaration?
Answer:property: value;
Question:Example of element selector?
Answer:h3 {color: blue;}
Question:What is inline CSS?
Answer:style='property: value;' in element
Question:How are CSS comments written?
Answer:/* comment */ multi-line
Question:Latest CSS version?
Answer:CSS3
Question:What is a class selector in CSS?
Answer:.className { styles }
Question:How to select specific type and class?
Answer:h3.center { styles }
Question:ID selector in CSS?
Answer:#idName { styles }
Question:Grouping selectors?
Answer:h1, h2, h3 { styles }
Question:Rule for no space between value and unit in CSS?
Answer:margin-left:20px not 20 px
Question:CSS specificity order?
Answer:IDs > classes > elements, !important highest
Question:How to set page background?
Answer:body {background-color: lightblue;}
Question:What are shorthand CSS properties?
Answer:Set multiple granular properties at once
Question:What is @keyframes in CSS?
Answer:For animations without JavaScript
Question:@media rule purpose?
Answer:Device-specific styles
Question:CSS pseudo-properties like content?
Answer:Add material before/after elements
Question:Link states in CSS?
Answer::link, :visited, :hover, :active
Question:Zebra-striped tables with CSS?
Answer:tr:nth-child(even) {background-color: #f2f2f2;}
Question:Responsive table with scroll?
Answer:...
Question:Ways to add JavaScript to webpage?
Answer:Event attributes, elements, external src
Question:What does document.write do?
Answer:Adds text to document
Question:Example of altering element with JS?
Answer:document.getElementById('id').innerHTML = 'text'
Question:Single-line JS comment?
Answer:// text
Question:Multi-line JS comment?
Answer:/* text */
Question:How to declare a variable in JS?
Answer:var x;
Question:Primitive variable types in JS?
Answer:String, Number, Date, Boolean
Question:What is an array in JS?
Answer:Indexed collection, zero-based
Question:Undefined variable value?
Answer:When not assigned
Question:Does redeclaring var keep value?
Answer:Yes, retains previous
Question:JS variable naming rules?
Answer:Letters, digits, _, $, start with letter/$/_ , case-sensitive, no reserved words
Question:Variable scope in JS?
Answer:Local inside functions, global outside
Question:How to create string variable?
Answer:var x = 'text';
Question:String indexing in JS?
Answer:Zero-based, x[0] first char
Question:Regular expression format?
Answer:/pattern/modifiers
Question:JS number types?
Answer:Single type, with/without decimal or exponent
Question:How to create date object?
Answer:new Date() or with params
Question:Boolean values?
Answer:true or false
Question:Array instantiation?
Answer:var a = ['item1', 'item2'];
Question:JS object creation?
Answer:var obj = {prop:'value'};
Question:Access object property?
Answer:obj.prop or obj['prop']
Question:What are object methods?
Answer:Functions as properties
Question:JS statements purpose?
Answer:Instructions executed by browser
Question:How are JS statements separated?
Answer:Semicolons
Question:Code blocks in JS?
Answer:{ statements }
Question:Function example in JS?
Answer:function name() { code }
Question:What are statement identifiers in JavaScript?
Answer:Reserved words that start statements and cannot be used as variable names
Question:List some JavaScript statement reserved words
Answer:break, continue, do, for, if, return, switch, throw, try, catch, var, while
Question:How are JavaScript statements executed?
Answer:One by one in the order written, unless flow control like for, if, or while adjusts it
Question:What is a JavaScript function?
Answer:A block of code executed as a discrete unit
Question:How is a basic function defined in JavaScript?
Answer:Using function keyword followed by name and curly braces with code inside
Question:What does the example function do?
Answer:Sets innerHTML of element with id 'element' to 'Hello'
Question:What are function parameters in JavaScript?
Answer:Names listed in the function definition that receive values
Question:How are multiple parameters separated in a function?
Answer:By commas
Question:How do you invoke a function with a parameter?
Answer:By calling the function name with argument in parentheses, e.g., func2('Hello World')
Question:What are function arguments?
Answer:Values passed to the function that are assigned to parameters
Question:What naming rules apply to function names?
Answer:Letters, digits, underscores, dollar signs; same as variables
Question:What does the return statement do in a function?
Answer:Stops execution and returns the specified value
Question:How do you distinguish a function object from invoking it?
Answer:Function name refers to object; name() invokes it
Question:What is event handling in JavaScript?
Answer:Assigning functions to specific events to respond to user actions
Question:What are examples of events in JavaScript?
Answer:Loading a page, clicking a button, moving a mouse
Question:How is event handling linked to HTML elements?
Answer:By assigning functions to event attributes of elements
Question:What method handles global events like page load?
Answer:document.addEventListener('load', function())
Question:What is the Document Object Model (DOM)?
Answer:Interface for JavaScript to access and manipulate HTML elements
Question:What is the root node of the DOM tree?
Answer:element
Question:What are the two sub-elements of the root in DOM?
Answer:and
Question:What can JavaScript do with DOM elements?
Answer:Change attributes, add/remove elements, react to events
Question:What is the aim of the W3C DOM standard?
Answer:Platform and language-neutral interface to access and update document content, structure, style
Question:What are the three parts of the DOM?
Answer:Core DOM, XML DOM, HTML DOM
Question:What programming approach does DOM use?
Answer:Object-oriented, with elements as objects having properties and methods
Question:How do you access an element by ID in DOM?
Answer:document.getElementById('id')
Question:What does innerHTML property do?
Answer:Sets or gets the HTML content inside an element
Question:Provide an example of using getElementById and innerHTML
Answer:document.getElementById('example').innerHTML = 'hello'
Question:What method returns elements by tag name?
Answer:document.getElementsByTagName('name')
Question:What method returns elements by class name?
Answer:document.getElementsByClassName('name')
Question:What method uses CSS selectors for elements?
Answer:document.querySelectorAll('CSSSelector')
Question:How do you change an element's inner HTML?
Answer:element.innerHTML = 'HTMLcontent'
Question:How do you change an element's attribute?
Answer:element.attribute = value or element.setAttribute('attribute', value)
Question:What method creates a new HTML element?
Answer:document.createElement('element')
Question:What method adds a child element?
Answer:document.appendChild('element')
Question:What method removes a child element?
Answer:document.removeChild('element')
Question:What is a node in the DOM?
Answer:Branching point in the tree structure
Question:What types of nodes exist in DOM?
Answer:Element nodes, attribute nodes, text nodes, comment nodes
Question:What is a NodeList?
Answer:Collection of nodes, like child nodes of an element
Question:How is the HTML document accessed via Window?
Answer:window.document
Question:What are Attr objects in DOM?
Answer:Representations of HTML element attributes
Question:What is a NamedNodeMap?
Answer:Unordered collection of nodes, like attributes of an element
Question:What can XMLHTTPRequest do?
Answer:Send, request, and receive data from server after page load
Question:How are JavaScript statements separated?
Answer:By semicolons
Question:What composes JavaScript language elements?
Answer:Values, operators, expressions, keywords, comments
Question:What are number literals in JavaScript?
Answer:Fixed numbers with or without decimals, e.g., 100 or 10.1
Question:How are string literals written?
Answer:Within double or single quotes, e.g., 'a' or "35"
Question:How are variables declared?
Answer:Using var keyword, e.g., var x;
Question:What is the assignment operator?
Answer:Equal sign (=)
Question:What is an expression in JavaScript?
Answer:Combination of values, variables, and operators
Question:How is string concatenation done?
Answer:Using + operator, e.g., 'a' + ' b'
Question:How are comments denoted in JavaScript?
Answer:// for single line, /* */ for multi-line
Question:What rules apply to identifiers?
Answer:First character: letter, _, or $; then letters, digits, _, $
Question:Is JavaScript case sensitive?
Answer:Yes, e.g., firstName ≠ FirstName
Question:What is lower camel case in JavaScript?
Answer:First word lowercase, subsequent words capitalized, e.g., firstName
Question:What character set does JavaScript use?
Answer:Unicode
Question:How can you insert text into HTML using JavaScript?
Answer:element.innerHTML = text
Question:What method writes to browser output?
Answer:document.write()
Question:How do you show an alert?
Answer:window.alert()
Question:How do you log to console?
Answer:console.log()
Question:Where can script elements be placed in HTML?
Answer:or
Question:What is the Infinity property?
Answer:Positive infinity number (-Infinity for negative)
Question:What does NaN represent?
Answer:Not-a-Number from invalid numeric operations
Question:What does undefined indicate?
Answer:Variable not assigned a value
Question:What does Boolean() convert to?
Answer:true or false
Question:What does decodeURI() do?
Answer:Decodes a URI
Question:What is the purpose of encodeURI()?
Answer:Encodes a URI
Question:What does eval() execute?
Answer:String as script code
Question:What does isFinite() check?
Answer:True if argument is finite number
Question:What does isNaN() return?
Answer:True if argument is NaN
Question:What does Number() convert to?
Answer:A number
Showing the first 200 of 240 cards. Open All cards to see the rest.