HTML + CSS Flashcards
(22 cards)
What is the DOM?
a programming interface with a dynamic tree-like structure generated from the HTMLdocument, which can be manipulated with JavaScript to change the document’s content, style, and structure.
what does the class attribute do?
Specifies one or more class names for an element. The class
attribute is mostly used to point to a class in a style sheet. However, it can also be used by JavaScript to access and manipulate elements with the specific class name.
can be used for javascript and css.
What does the ID attribute do?
Specifies a unique id for an element. The id attribute is used to point to a style in a style sheet, and by JavaScript (via the DOM) to manipulate the element with the specific id.
What does the style attribute do?
Specifies inline CSS style for an element.
only one specifically css
What does ‘window.onload‘ do?
used to run a block of code when the page
has finished loading.
What does document.querySelector() do?
used to select the first element
with the specified class.
What does addEventListener() do?
used to attach a click event to the
selected elements.
In CSS what does bg-blue-900 do?
changes the background colour to the specific colour of blue (900)
In CSS what does hover:scale-110 do?
upon hovering, transforms it so its 10% bigger.
In CSS what does mt-4 mean?
apply marginof 4 px to the top
In CSS what does pb-2 mean?
apply padding of 2 to the bottom.
what is <head>
?
contains metadata, title and links
?
What is <body>
?
holds visible content such as headings, paragraphs etc. contains the content that is rendered in the browser.
What is <div>
?
A generic container used for grouping related content.
What is <input>
?
Creates interactive fields.
What is <br>
Inserts a line break.
What is <label>
?
Provides a caption for an input element
What is <thead>
?
Groups the header content of the table.
What is <tbody>
?
Groups the main body of table data.
what is <tr>
Represents a table row.
what is <th>
?
Defines header cells in a table row.
<td>
?
Represents a standard data cell in a table.