Midterm Exam: Interactive Web Programming
Midterm Exam: Interactive Web Programming
The <th> tag in HTML specifies header cells in a table, aligning data to provide context and meaning, while being visually distinct through bold or centered text . The cellspacing attribute defines the space between table cells, impacting the overall readability and aesthetic layout, making grouped data clear and accessible . Together, they enhance data organization and visual presentation on web pages.
Hyplink attributes like _blank and _parent enhance user navigation and interaction. The _blank attribute opens linked documents in a new window or tab, allowing users to retain their current browsing position while accessing new content . The _parent attribute opens linked content within the parent frame, useful for framed layouts, ensuring that changes reflect immediately within the existing structure . These attributes offer versatile navigational options tailored to user experience.
File Transfer Protocol (FTP) is used for the transfer of computer files between a client and server on a network, focusing on file transfers themselves . In contrast, HTTP is designed for transferring hypertext pages between browsers and servers, emphasizing quick and simple interactions for web pages . FTP is often used for downloading files from servers, whereas HTTP manages requests and data transfers for web pages.
HTML heading tags (<h1> to <h6>) define the hierarchy and structure of web content, influencing both user navigation and search engine optimization. They help users quickly discern page topics and enable search engines to understand and index the content structure . Appropriate usage improves accessibility, making content easier to digest and search-engine-friendly, thus enhancing user experience.
A web server acts as the software or hardware that uses HTTP to respond to client requests made over the World Wide Web . A web browser, on the other hand, is a software application for accessing information on the World Wide Web . They interact using HTTP, which requires the server-client connection to be reestablished for every data transfer . This interaction is essential for retrieving and displaying web pages to users.
Client-server interactions in web applications showcase request-response cycles, where the client sends a request via a browser, and the server processes this request to return an appropriate response. Examples include requesting a web page (HTTP GET), submitting form data (HTTP POST), and fetching specific data entries for dynamic pages (API queries). Each cycle involves establishing, processing, and closing connections, demonstrating HTTP's stateless nature .
Pros include easy global communication, immediate access to vast information, and opportunities for educational advancements. Examples are email services for communication, search engines for information retrieval, and online courses for learning . Cons involve risks like privacy concerns due to data breaches, misinformation due to lack of regulation, and digital divide excluding non-technology-savvy populations. Examples are phishing emails compromising security, spread of fake news, and lack of access in underdeveloped regions .
HTML defines the structure of web pages using a series of elements. The <html> element is the root element of an HTML page, indicating the start of the document. The <head> element contains metadata, including the title defined for browsers . The <body> element contains the actual content to be displayed on the webpage, organizing data with tags such as headings, paragraphs, and lists . This structure ensures proper rendering by browsers.
Ordered lists, created with <ol> tag, organize items in a sequential order using numbers. Unordered lists use the <ul> tag to present items without a specific sequence, shown with bullet points . Description lists, defined with <dl> tag, provide a list of terms along with descriptions . Each type serves specific purposes in web design for appropriately categorizing and displaying information.
HTML forms enable user input through fields like textboxes, checkboxes, and buttons to interact with web applications. Attributes critical for security include input validation to prevent SQL injection or XSS attacks and 'autocomplete' settings to protect user data . Moreover, using 'method="post"' for sensitive transactions adds a layer of security by not displaying data in URLs. Proper form design includes clear instructions, feedback messages, and secure data handling.