HTML CSS Interview Questions and Answers

Lecture



  HTML CSS Interview Questions and Answers

1. what is the difference between line and block HTML tags

2. What is the difference between the following selectors?

p span

p> span

p + span

1. HTML5 do you know? Draw something.
<rect x = ”100” y = ”100” width = “300” height = “300”
fill = “blue” stroke = “red” stroke-width = “50px” rx = “8” ry = “8” id = “myRect” class = “chart” />
Draw a blue square with a red frame with rounded edges.
2. How is HTML different from XHTML?
XHTML is an XML dictionary, while HTML is just the preceding
XHTML markup language.
The main difference between the two is in the processing of the document. XHTML documents are
trample their module (parser) in the same way as XML documents. In the process of this processing
The mistakes made by the developers are not corrected.
More details about the differences:
- All items must be closed. Tags that do not have a closing tag (for example,
<img> or <br>) must have at the end of / (for example, <br />).
- Boolean attributes are written in expanded form. For example, you should write <option
selected = ”selected”> or <td nowrap = ”nowrap”>.
- Tag and attribute names must be in lower case letters (for example,
<img alt = "" /> instead of <IMG ALT = "" />).
- XHTML is much stricter on errors in the code; <and & everywhere, even in the URL, should replace-
<and & respectively. On the recommendation of the W3C browsers, encountering an error in XHTML,
must report it and not process the document. For HTML, browsers should have
to understand what the author wanted to say.
- The default encoding is UTF-8 (as opposed to HTML, where the default encoding is
is ISO 8859-1).
3. What is the DOCTYPE and why is it needed?
DOCTYPE is the definition of the document type (Document Type Definition (DTD)), the rules, according to
How are you checking a specific XML document (web page)?
or (x) html. Through this entry, the browser determines which document is used in this document.
DTD version is available.
And it is needed for browsers to correctly display the markup of the document. If you do not specify DOCTYPE, then the browser will add a “gag”, with each browsers adding
to cast his own gag. As a result, there can be no talk of any cross-browser compatibility.
4. What is the difference between div and span?
div is a block container, and span is a linear container.
Containers are something that anything else can be invested into.
div is used to mark up blocks, and span is for text.
div forms a block of what is in it from the new line and after it the element goes from the new line.
(if you do not change the behavior using CSS), but the span does not tolerate and “wraps around”
5. How are HTML comments designated?
<! - like this ->
6. References. How to set the address of the document to which to go?
<a href=eshttp://vottak.com/example/example.htmlaint> Absolute Link </a>
<a href=ace../../example/example.htmlê> Relative Reference </a>
7. How to make a link to email?
<a href="mailto:jeffjoellennox@mail.ru September> E-mail me </a>
8. What do <em> tags do?
Displays enclosed text in italics.
9. What are <ol>, <ul> and <li>
The <ol> tag sets a numbered list. Each list item must begin with a tag.
<li> If a style sheet is applied to the <ol> tag, then the <li> elements inherit these properties.
The <ul> tag sets an unnumbered (bulleted) list.
10. Why do I need <dl>, <dt>, <dd> tags?
Tags <dl>, <dt>, <dd>, are intended to create a list of definitions. Every such list
starts with the <dl> container, which includes the <dt> tag, which creates the term, and the <dd> tag that defines
definition of this term. The closing </ dd> tag is optional, since the following
tag reports the end of the previous item. However, a good style is
close all tags.
11. Why do we need <tr>, <th>, <td> tags?
The <tr> tag serves as a container for creating a table row. Every cell within such
strings can be specified using the <th> or <td> tag.
<th> is designed to create a single table cell, which is designated as the heading.
The text in such a cell is displayed by the browser usually in bold and aligned.
in the center. The <th> tag must be placed inside the <tr> container, which in turn
located inside the <table> tag.
<td> is designed to create a single table cell. The <td> tag must be placed inside
container <tr>, which in turn is located inside the <table> tag.
12. In which case is it better to write HTML code?
It used to be thought that it didn’t matter. But with the advent of XHTML, this question has an unambiguous answer - we write all tags, attributes and predefined values ​​in lower case.
13. How to remove the blue frame around the picture-links?
Like this:
<img border = ”0” ... />
14. Is it necessary to write alt in <img>?
Yes. This requires a standard, and common sense, because some users still disable
pictures, and some use text or even voice browsers. If the picture is not
carries no meaning (design element, “spacer”, etc.), then we can put in
The <img> tag is alt = ””.
15. What are entities?
Entities are combinations of the & character and an alphabetic or numeric code after it, intended
to replace characters that cannot be found in “pure” form in HTML text,
for example, the character “<”.
16. How to make all site hyperlinks open in a new window, that is, the default is target = ”_ blank”?
It is necessary to register the base tag with the attribute target = ”_ blank” in the head area:
<head>
<base target = ”_ blank”>
</ head>
17. And what now, if I want to open some of the hyperlinks in the same window, i.e. without creating a new one?
In the <a> tag of this link you will need to add the attribute target = "_ self", because by default
we now use target = ”_ blank”.
17. What are W3C standards?
The World Wide Web Consortium (W3C) - the organization, developed by
and implementing technology standards for the World Wide Web.
The W3C develops common principles and standards for the Internet, called “recommendations”
Yami ”, which are then implemented by software and hardware manufacturers. In this way
compatibility between software products and hardware of various components is achieved
that makes the World Wide Web more sophisticated, versatile and convenient

Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Cascading CSS / CSS3 Style Sheets

Terms: Cascading CSS / CSS3 Style Sheets