Technical (HTML, CSS, JS) Flashcards
What is HTML?
Hyper Text Markup Language for creating web pages
What is HTML tag?
Keyword surrounded by angle brackets, usually come in pairs; first tag in pair is opening tag, second is closing and have forward slash before the tag name
What is JavaScript?
JS is a programming language that is used to add interactivity to web pages. It is a client-side language (executed on the user’s computer, not on server). Can be used to add animations, pop-ups, form validation, etc
Where and how can you add JS code to HTML page?
There is internal and external JS code. Internal is inserted into HTML file between
tags usually in body section. External JS is a separate file with JS code that is later linked to HTML file withtag with src attribute, it's usually done in head section
What is JS function? How is it executed? Why do we need to execute it?
Function is a block of code which only runs when it’s called. JS function is executed (called) by event only (button click, call within script or another function). Need to execute it so actions in function will be performed
What is difference between == and === in JS?
== compares values, === compares values and types
What are the specifics of web applications and how it affect your testing activities?
Content is always HTML, CSS, JS and it is dynamically loaded into browser so you don’t need to install or set up anything. Also in browser you have dev tools which you can use for some testing activities;
Browser, dev tools, networking, CSS, tags, almost always gray box
Explain the basic structure of an HTML document.
Firstly there is Head where you specify page title, external JS and CSS files, etc;
then there is Body where all the main code located in form of DOM tree (parent and child elements structure); inside Body we have all tags which needed to display page (e.g.: div, span, p, img, a, h1..6, etc)
Describe the difference between HTML elements and HTML tags
Element is a component of a web page, tells a web browser how to structure and interpret a part of the HTML document, consists of opening and closing tags, formatting instructions, semantic meaning and content, also element is exactly what displayed on a web page, e.g.: <p style..>This is element</p>
Tag is a building block of a web page, indicates to a web browser of how a web page should be displayed, usually exist in pairs of starting and ending tags, e.g.: <h1></h1>
Explain the difference between inline elements and block-level elements
Inline elements don’t start new line (span); block-level elements start new line and takes the whole width of the page (div)
Describe the attributes and usage of the <img></img> tag in HTML
<img src=’link’ alt=’text’ style=’’>
Usage - to add images to the web page. Attributes: src - link/path to the image location, alt - alternative text that will be shown if img won’t load, style - to add inline CSS properties
How to create table in HTML?
<table>
<tr>
<td>text1</td>
<td>text2</td>
</tr>
<tr></tr>
</table>
Explain difference between relative and absolute URLs in HTML
Absolute URL is path to the element from the top most directory; relative - from current
How do you add submit button to HTML page?
Button tag with input type submit
What is input validation in HTML forms?
Checking if the form field accepts correct amount (min/max), type, format, etc of the user input