Things to remember HTML Flashcards
What does HTTP stands for?
Hyper Text Transfer Protocol
How to open links in new tabs.
With the target=_blank attribute.
e.g.:
<a href:”www.xyz.de” target=_blank>xyz</a>
How to parse all HTML before executing java scripts?
defer (
This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed
What does the async attribute do?
The async attribute loads and executes the script asynchronously with the rest of the webpage.
Similar to the defer attribute, the HTML parser will continue parsing the rest of the HTML as the script is downloaded in the background.
However, with the async attribute, the script will not wait until the entire page is parsed: it will execute immediately after it has been downloaded.
How do you create an input field that can be used in a form?
/form action=”restaurants”/
/label for=”name-input”/Name//label/
/input id=”name-input” type=”text” name=”name”/
/input type=”submit” value=”Submit”/
/form/
Short for writing an ul with a class of “nav” with 3 li’s with class “item” and ankers with class “links?
ul.nav>(li.item>a.links)*3
Which attribute can you use to indicate the current state of a collapsible element on the page?
The aria-expanded attribute:
- When aria-expanded=”true”, it means the content is visible.
- When aria-expanded=”false”, it means the content is hidden.
What tag is used to create a form in HTML?
<form>
How do you specify a text input field in an HTML form?
<input type="text" id="someId" name="someName">
Which attribute is used for password fields in a form?
type=”password”
What element is used to group radio buttons in a form?
<fieldset>
What tag is used to label a group of related form elements within a <fieldset>?
<legend>
How do you create a radio button in an HTML form?
<input type="radio" id="someId" name="someName" value="someValue">
Which HTML attribute should be used to label form controls for better accessibility?
for in <label> tags, linking to the id of the input element.</label>
How do you create a multi-line text input in an HTML form?
<textarea id="someId" name="someName" rows="5" cols="33"></textarea>
What type of input should you use for collecting email addresses?
<input type="email" id="someId" name="someName">
What is the purpose of the name attribute in form elements?
To specify the name of the form data variable that will be sent to the server.
How do you add a submit button to an HTML form?
<input type="submit" value="Send Request">