Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

IT Practical Exam Practice ft.

Theory

1. Explain what is HTML: element, tag, attribute, doctype.

- HTML element is the individual components of the HTML document. Element


consists of the starting tags, the attributes, the ending tags and the element
content. An example would be “<p>Hello World</p>”. It is everything in between
and including the open tag and the closing tag of the line of code.

- HTML tags are the symbols“<>” and words (e.g “h1/p/a”) that de ne the opening
and closing of an HTML element.

- HTML attributes are the modi ers that change the original functionality of an
HTML tag, e.g “ <p class = “hello”>Hello world </p>”. The “class” in this manner
would be an attribute.

- HTML doctype is also known as the HTML document type declaration which is
written at the very rst line of code. It is an instruction that declares to the browser
in terms of what version of HTML it is. E.g“ <!DOCTYPE html>”

2. Explain the purpose of: accesskey, tabindex, data attributes.

- Accesskey is an attribute that mentions a shortcut key of an alphabet which


triggers an element. For example, “<a href=“eg.html accesskey = “e”>clickme </
a> The accesskey here is the letter “e”, when the user presses “e”, the user will
be redirected to the html page called “eg.html”.

- Tabindex is also an attribute, similar to accesskey, where it mentions a shortcut


key of a numerical gure which triggers an element. For example, “<a
href=“eg.html tabindex = “5”>clickme </a> The tabindex here is the number “5”,
when the user presses “5”, the user will be redirected to the html page called
“eg.html”.

- Data attributes allow us to store extra private information for the server-side. The
syntax is as follows “<li data-*any word* = ‘this is important’>hello</li>”.

3. What kind of content model does <title> belong to?

- Metadata content

4. How to show thematic breaks in a web page?

<hr> is the horizontal rule element that represents a thematic break in a webpage.

5. Explain what is the !important Rule

This rule makes sure that the css within this tag will be applied without any other
condition. Syntax as follows: <! - - {css} - - >

6. How to use CSS selector to select elements with speci c attributes?

The [attribute] selector selects elements with speci c attributes. For example, “

a[target]{

background-colour: yellow;

fi
fi
fi
fi
fi
fi
7. How to display responsive layout on devices of di erent screen sizes?

“@media only screen and (min-width: 700px){

‘css’

}”

ff

You might also like