Web Technologies Flashcards
How do we access a webpage?
Connect to web via ISP (Internet Service Provider), comp contacts DNS (Domain Name System) servers, returns IP address, comp uses num provided by DNS to go to web server hosting website to visit, web server sends page to web browser.
What is HTML used for?
What is CSS used for?
HTML: Text, vid, tables, audio, links, forms, images + lists (STRUCTURE)
CSS: Presentation + layout
What are attributes?
Tell us more about elements e.g. <a> Attribute name is lang, attribute value is en-us. Require name + value.</a>
What is the structure of a webpage?
Head, including title, body, headings such as h1, h2 and main body, usually in paragraphs. Anything in body displayed on webpage. HTML pages are text docs, use tags/elements (containers), tell us about info between them, usually in pairs.
What is markup?
Creating a page, involving adding tags to content. 2 types, structural + semantic. Headings go from level 1 – 6. Whitespace is collapsed so only displays 1 normal space. Semantic markup is a set of elements which provides extra info about content, not used to alter presentation of elements differently.
What are the 3 types of lists?
Ordered (numbered), unordered (bullet point) & definition (define terms). Can be nested inside one another. <li> stands for list item.</li>
What is directory structure?
Root folder at top, each child folder which also has parent folder, may also have grandchild folders (esp. root folder) + so grandparent folder.
If linking to page within own site, use relative links rather than qualified URLs. Can use id attribute to target elements within a page that can be linked to.
How do forms work?
User fills in form + presses button to submit info to server, name of each form control sent with value user entered, server processes info using programming language, server creates new page to send back to browser based on info received.
How is info sent in forms?
Info from form sent in name/value pairs. Each form control given name + text user types in/values selected sent to server.
What is involved in CSS?
Selector (p) + declaration e.g. p {font-family: Arial;}. Associates style rules with HTML elements + affects how elements displayed. Treats each HTML element as if it appears inside own box, uses rules to indicate how it looks.
How do we display different colours in CSS?
Hexcode, colour name or RGB values for colours. CSS3: RGBA indicates opacity, also allows to specify colours with HSL values + optional opacity value (HSLA). A stands for alpha.
What are the different CSS selectors?
Universal (*{}), Type (h1, h2, h3{}), Class (.note{} p.note{}), ID (#introduction{})
Why would we use external CSS stylesheets?
Same CSS used for every page of website, don’t have to copy style code into each webpage, changes automatically applied, faster download for subsequent pages, easier to create new pages in same style.
Why does CSS having diff versions affect how it displays?
Some browser quirks/bugs as browsers don’t implement all features, older browsers don’t support each property.
How do rules work in CSS?
Made up of selectors (to specify which elements rule applies to) + declarations (to say appearance). Diff selectors allow targeting rules at diff elements. Declarations have 2 parts: properties of element changing + value of properties.
What are the previous versions of HTML?
First in 1990. HTML 2.0 was 1st to support GUI (1995).
3.2 introduced web forms + tables (1997). 4.01 added stylesheets & scripting technologies (1999). XHTML 1.0: XML is scripting lang, lets developers define own markup lang. (2000). 5.1 Follows XML rules, compatible with HTML, CSS + XHTML, logical layout elements, support for apps/rich media, removes HTML display elements in favour of CSS. (2016)
What are the rules of XML?
Every element in doc needed closing tag, element names lowercase, old elements not used, attribute values in quote marks, tags nested correctly + shouldn’t overlap.
What is the DOCTYPE variable for?
Tells browser how each page should be viewed. For HTML5, it’s . HTML comments appear inside . Escape characters: e.g. pound sign (£), copyright (©), trademark (™).
What is the HTML id/class attribute for?
Uniquely identifies 1 element within page, used by CSS & JavaScript. E.g. <p> Every element can also have class attribute, sev elements grouped under 1 class attribute. E.g. </p><p class="“red”">.</p>
What are the 2 categories of HTML elements?
Block level (starts on new line in browser window e.g. <p>) i.e. div tag, most useful for defining sections in webpage, each tag should have id/class to be unique. Inline level (continues on same line e.g. <b>) i.e. span tag allows elements to be differentiated, can be grouped, most useful with CSS.</b></p> div can create box.
What is an iframe?
Cuts window into webpage, allows us to see other webpage behind it e.g. Google Map