INTODUCTION OF HTML & CSS
INTRO ABOUT HTML &CSS
Elements and Tag: HTML uses predefined tags and elements which tells the browser about content display property. If a tag is not closed then browser applies that effect till end of page.
HTML page structure: The Basic structure of HTML page is given below. It contain some elements like head, title, body, … etc. These elements are used to build the blocks of web pages.
<html>: This is called HTML root element and used to wrap all the code.
<head>: Head tag contains metadata, title, page CSS etc. All the HTML elements that can be used inside the <head> element are:
- <style>
- <title>
- <base>
- <noscript>
- <script>
- <meta>
- <title>
<body>: Body tag is used to enclosed all the data which a web page has from texts to links. All of the content that you see rendered in the browser is contained within this element.
Features of HTML:
- It is easy to learn and easy to use.
- It is platform independent.
- Images, video and audio can be added to a web page.
- Hypertext can be added to text.
- It is a markup language.
Why learn HTML?
- It is a simple markup language. Its implementation is easy.
- It is used to create a website.
- Helps in developing fundamentals about web programming.
- Boost professional career.
Advantages:
- HTML is used to build a websites.
- It is supported by all browsers.
- It can be integrated with other languages like CSS, JavaScript etc.
Disadvantages:
- HTML can create only static webpages so for dynamic web page other languages have to be used.
- Large amount of code has to be written to create a simple web page.
- Security feature is not good.
WHAT IS CSS?
Cascading Style Sheets, fondly referred to as CSS, is a simply designed language intended to simplify the process of making web pages presentable. CSS allows you to apply styles to web pages. More importantly, CSS enables you to do this independent of the HTML that makes up each web page.
CSS is easy to learn and understood but it provides powerful control over the presentation of an HTML document.
WHY CSS?
- CSS saves time : You can write CSS once and reuse same sheet in multiple HTML pages.
- Easy Maintainence : To make a global change simply change the style, and all elements in all the webpages will be updated automatically.
- Search Engines : CSS is considered as clean coding technique, which means search engines won’t have to struggle to “read” its content.
- Superior styles to HTML : CSS has a much wider array of attributes than HTML, so you can give a far better look to your HTML page in comparison to HTML attributes.
- Offline Browsing : CSS can store web applications locally with the help of offline catche.Using of this we can view offline websites.
CSS Syntax
A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding elements in your document.
A style rule set consists of a selector and declaration block.
Selector => h1 Declaration => {color:blue;font size:12px;}
- The selector points to the HTML element you want to style.
- The declaration block contains one or more declarations separated by semicolons.
- Each declaration includes a CSS property name and a value, separated by a colon.
For Example:
-> color is property and blue is value.
-> font size is property and 12px is value. - A CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces.
- For more practical post visit to our Instagram page:-
- https://www.instagram.com/codesmashers7/?hl=en
- @codesmashers7
- https://www.instagram.com/codesmashers7/?hl=en
- @codesmashers7
nice overview
ReplyDeleteunderstanding concept
ReplyDelete