https://www.w3schools.com/html/default.asp https://www.w3schools.com/css/default.asp
HTML stands for Hyper Text Markup Language. it is a standard language for creating web pages,mark up language is a language which uses tags to define something.
HTML tags are used to mark or define elements within an HTML document. They provide structure and formatting instructions for web browsers to display content correctly.
The <!DOCTYPE> declaration specifies the document type and version of HTML used in a web page. It helps the browser render the page correctly by defining the rules and syntax for the document.
HTML5 is the latest version of HTML. It introduced new elements (e.g.,
Inline elements do not start on a new line and only take up as much width as necessary. Examples include , , and . Block-level elements, on the other hand, start on a new line and take up the full width of their parent container.
You can create a hyperlink using the a (anchor) element. Example: Visit Example.
The tag is used to provide metadata about the web page, such as character encoding, viewport settings for responsive design, and page description for search engines.
- what is css ?
- what are ways to include the css in our web page?
inline : when we directly apply the css or style to the html element then it is inline way of applying css.
- What is the difference between display: none; and visibility: hidden;?
display: none; completely removes an element from the document flow, making it invisible and not taking up any space.
visibility: hidden; makes an element invisible, but it still occupies space in the layout.
- What is the difference between class and ID selectors in CSS?
Class selectors are preceded by a period (.) and can be used to apply styles to multiple elements on a page.
ID selectors are preceded by a hash symbol (#) and are used to select and style a single unique element on a page.
- What is the default value of the position property in CSS?
- How can you center an element horizontally using CSS?
- What is the difference between display: block; and display: inline;?
display: block; makes an element a block-level element, causing it to take up the full width available and start on a new line.
display: inline; makes an element an inline-level element, allowing it to flow within the content and not start on a new line
- what is cascading styles in css ?
Cascading order in css determines how conflicting or overlapping rules are applied for html elements.
eg :
<style> p{ color:red; } .text{ color:blue; } #content{ color:pink } </style>text in p tag
here p will be of pink color because id selector has the highest specificity.
order of specificity is :
-
Inline styles
-
id selector
-
class selector
-
inheritance.
-
how can i add background to element?
- what is box model in css ?
box model is fundamental concept in css and html. it tell how the content is and how much padding , margin and width and height of that element.
there are various elements in the css box model: 1.Content This is the innermost part of the box, where the actual content, such as text, images, or other HTML elements, is displayed. It has a width and a height.
2.Padding:
The padding is the space between the content and the element's border
Border:
The border is a line or stroke that surrounds the content and padding. It separates the content from the margin.
Margin:
The margin is the space between the border of the element and adjacent elements in the layout.
- what are the various text css properties?
- what are various position properties ?
The CSS position property is used to control the positioning of an element within its containing element.
Static (Default): Elements are positioned in the normal flow of the document. This is the default value, and elements are not affected by the top, right, bottom, or left properties.
Relative: Elements are positioned relative to their normal position in the document flow. You can use the top, right, bottom, and left properties to offset the element from its normal position.
Absolute: Elements are positioned relative to their nearest positioned ancestor (an ancestor with a position other than static). If there is no positioned ancestor, the element is positioned relative to the initial containing block (usually the viewport).
Fixed: Elements are positioned relative to the viewport, and they do not move even when the page is scrolled. Fixed-positioned elements are also taken out of the normal document flow.
Sticky: Elements are positioned based on the user's scroll position. They behave like relative positioning until they reach a specified offset from the top of the viewport, at which point they become fixed.
- what is css3 ?
New Selectors: CSS3 introduces powerful new selectors that enable more precise targeting of HTML elements, including attribute selectors, pseudo-elements, and pseudo-classes.
Box Model Enhancements: CSS3 introduces properties like border-radius and box-shadow for creating rounded corners and drop shadows on elements, respectively.
Gradient Backgrounds: CSS3 provides the ability to create gradient backgrounds using the linear-gradient() and radial-gradient() functions, eliminating the need for background images in some cases.
Text Effects: CSS3 includes text-related properties for controlling text shadow, text overflow behavior, and text wrapping.
Transitions and Animations: CSS3 introduces the transition and animation properties, allowing developers to create smooth transitions and animations for various CSS properties.
Media Queries: CSS3 enhances media queries, enabling designers to create responsive designs that adapt to different screen sizes and devices.
- what are css combinators?
