Answer the following questions with your group:
- How do you link a JavaScript file to an HTML document?
- How do you link a CSS file to an HTML document?
- What are the roles of HTML, CSS, and JavaScript on a webpage?
- What is the DOM? How is it related to HTML, CSS, and JavaScript?
- How does HTML get rendered into DOM?
- What are elements?
- What are attributes in HTML?
- How can we interact with HTML?
1- Using the <script> tag to link JS file to an HTML document, with
src
attribute to specify the URL of an external script file.2- Using the element to link to an external CSS file. e.g.: rel="stylesheet" href="styles.css"
3- HTML provides the basic structure of sites, which is enhanced and modified by other technologies like CSS and JavaScript. CSS is used to control presentation, formatting, and layout. JavaScript is used to control the behavior of different elements.
4- The Document Object Model (DOM) connects web pages to scripts or programming languages by representing the structure of a document—such as the HTML representing a web page—in memory. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree. With them, you can change the document's structure, style, or content.
5- HTML characters are converted to Tokens. then Tokens are converted into nodes.
6- An element is a part of a webpage. In XML and HTML. an element may contain a data item or a chunk of text or an image, or perhaps nothing. A typical element includes an opening tag with some attributes, enclosed text content, and a closing tag.
7- Elements in HTML have attributes; these are additional values that configure the elements or adjust their behavior in various ways to meet the criteria the users want.
8- The easiest way interact with HTML is in the DOM, is by using the element id.