0% found this document useful (0 votes)
19 views133 pages

WD Gtu Question

This is a web development chapter 7

Uploaded by

Tulsi Sutariya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
19 views133 pages

WD Gtu Question

This is a web development chapter 7

Uploaded by

Tulsi Sutariya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 133
9:24 = HTTP GET In GET method we can not send large amount of data rather limited data of some number of characters is sent because the request parameter is appended into the URL. GET request is comparatively better than Post so it is used more than the Post request. GET requests are only used to request data (not modify) GET request is comparatively less secure because the data is exposed in the URL bar. Request made through GET method are stored in Browser history. GET method request can be saved as bookmark in browser. Request made through GET method are stored in cache memory of Browser. Data passed through GET method can be easily stolen by attackers as the data is visible to everyone.GET requests should never be used when dealing with sensitive data In GET method only ASCII characters are allowed. In GET method, the Encoding type is application/x-www-form-urlencoded ios D ireutll G5)! HTTP POST In POST method large amount of data can be sent because the request parameter is appended into the body. POST request is comparatively less better than Get method, so itis used less than the Get request. POST requests can be used to create and modify data. POST request is comparatively more secure because the data is not exposed in the URL bar. Request made through POST method is not stored in Browser history. POST method request can not be saved as bookmark in browser. Request made through POST method are not stored in cache memory of Browser. Data passed through POST method can not be easily stolen by attackers as the URL Data is not displayed in the URL In POST method all types of data is allowed, In POSTmethod, the encoding type is application/x-www-form-urlencoded or multipart/form-data. Use multipart encoding for binary data 1TTP GET and POST Methods —- FAQs jow are data sent in HTTP GET and POST requests? GET sends data appended to the URL as query parameters, while POST sends dat. request body. SHTIPGETorPosTmoresecure? $M © <4 itu ren Merely Rents ! hi Create HTML form (Background Color. oo Lay — tte also rel zs = ee image) using CSS. Boat bd ST} = Fo Styled Form BIA al-r10 Sih =

Sign Up

Name Sie R a] = Fe

Sign Up

Name Email
CamScanner 4:32 PM 3.5KB/s 0 wast] GOD: KX Vv 95 CSS Vari... < (3schools.com 3 Ww Menuy¥ QQ Login schools — HTML CS JAVASCRIPT SQL CSS Variables - The var() Function CSS Variables The var() function is used to insert the value of a CSS variable. CSS variables have access to the DOM, which means that you can create variables with local or global scope, change the variables with JavaScript, and change the variables based on media queries. A good way to use CSS variables is when it comes to the colors of your design. Instead of copy and paste the same colors over and over again, you can place them in variables. a © ca be) CamScanner 4:32 PM 13.3KB/s d) att! GO 3 Ww Menuy QQ Login schools — eee CSS JAVASCRIPT SQL The Traditional Way The following example shows the traditional way of defining some colors in a style sheet (by defining the colors to use, for each specific element): Example body { background-color: #1le90ff; } h2 { border-bottom: 2px solid #1e90FF; } -container { color: #1e90ff; background-color: #ffffff; padding: 15px; button { background-color: #ffffff; color: #1e90fFf; a © a be) CamScanner 4:32 PM 22.6KB/s d watt) GO: s w Menuy QO Login schools CSS OPW Old ea SQL button { background-color: #ffffTff; color: #1e90ff; border: 1px solid #1e90ff; padding: 5px; Try it Yourself » Syntax of the var() Function The var() function is used to insert the value of a CSS variable. The syntax of the var() function is as follows: var(--name, value) Value Description name Required. The variable name (must start with two dashes) = @ < be) CamScanner 4:32 PM 0.0KB/s sal) Gs 3 w Menuy QO Login schools — eee CSS JAVASCRIPT SQL Value Description name Required. The variable name (must start with two dashes) value Optional. The fallback value (used if the variable is not found) Note: The variable name must begin with two dashes (--) and it is case sensitive! How var() Works First of all: CSS variables can have a global or local scope. Global variables can be accessed/used through the entire document, while local variables can be used only inside the selector where it is declared. To create a variable with global scope, declare it inside the :root selector. The :root selector matches the document's root element. a © tag: SS aNe Blt Time Table Boi r ls

Weekly Time Table

Bot: ated Day/Time 9:00 - 10:00 10:00 - 11;00 Sa | Pa 12:00 - 1:00 Sod ibd a raeehe aa ld 2:00 - 3:00 3:00 - 4:00 aad eo * tag dp ead> BSL e| 2>Weekly Time Table Badia the aditd 9:00 - 10:00 10:00 - 11:00 11:00 - 12:00 12:00 - 1:00 1:00 - 2:00 BS dub ed te eed 3:00 - 4:00 Monday Rodis elite) eats Baa hb Aa English Baste ae het SI nerd Bo tsbi Gal Pea hoe et Lunch SS teh ap Rade ath A de ld Geography astabd (0 -1e Oa a Biology Math SSaeb diy SRLS Amerd baa la he Rated Lunch pa Gu et ae haa PE £3 ad Wednesday History Bade bd bee es eI at Math Boestd i SB RDI aa be pads tamil ho mae bg Sa Cibd dep aeDoaaild Chemistry Botte tel e mdb Geography Sate Pea Beaded BS Mba sbaen hea Baa Bader Chih rant Lunch BS eh) au aed bg Bat raat) PPR tra Py aaed Sadia te OIA died Saat Pete ead Geography History Biology Boe aM alee m 4:38 PM 0.0KB/s 0° But Wea ci Chemistry pa aces edna ES JA ees History Biology Math bad a SORIA ded Lunch Physics Chemistry Jaded Thursday Geography Ba ee eee RIA td Biology Math Lunch English Bodhi Sasa ced Pa aed Friday Chemistry Geography History Biology Lunch Bie Claibs mast d>PE Aas Le This HTML code creates a simple timetable for a week with different subjects scheduled throughout the day. You can modify the subjects, days, and times according to your needs CamScanner 4:41 PM 2.1KB/s 0° Bu GS: x Vv 295 HTMLT.. Go: chatgpt.com Explain how basic and nested tables are created using HTML Basic Tables in HTML A basic table in HTML is created using the “* tag, which contains rows (**) and within those rows, table data (*
") or table headers (**). Here's a simple example Header 1 Bia ae Ba Clie Sadie ee ted Ba eel he aoa STAs ee Baa he OAS Bo aot he eS at Ba era he ab Ae ed Sa] De * °
Data 1Data 3
*: This tag defines the table itself. « *°: This tag defines a row in the table. « ° J aw-| Sete CamScanner 4:42 PM 4.4KB/s d) B iu HTML Ti... ra o chatgpt.com x Vv errr
": This tag defines a header cell in the table. It typically makes the text bold and centered * ‘*: This tag defines a standard data cell in the table Nested Tables in HTML Nested tables are tables within a table cell. This can be useful for creating complex layouts. Here's an example of a table with a nested table inside it Svea So aeba) (ep a-le Mh Che Ame
Header 1 Header 2
Data 1 Sa) -) an ae
Nested Header 1 Nested Header 2
Nested Data 1 Nested Data 2
Nested Data 4
Data 3 Data 4
Nested Header 2 aoe Sodtra ste 1 Ae ro Batsed) tee ad Sarat ia Dee Pade BT Ad Tad ed SJ Ae | Bete In this example: * The first table has two columns and three rows. * The second row of the first table contains a nested table inside the second cell (‘
Nested Data 2
Data 3 Data 4*). * The nested table itself has its own headers and data, making it an independent tabl within the cell of the parent table. Key Points: + Basic Tables: Defined with ‘ *, containing rows (**), and cells ("
or **) * Nested Tables: Tables within table cells, allowing for more complex data structures. This nesting approach can be used to create detailed layouts but should be used cautiously as it can complicate the structure and readability of your HTML code. CamScanner Stiiau0 ae Bae) Table Layout State te table { Explain the use of HTML table element for designing the web page layouts with appropriate examples. Example solid black; : collapse; solid black; : lightgray; : center; : : | aaa CamScanner Beaver : lightyellow; BR al ste) 1-1 a } >

Website Header

    SSB Esl SI ae ea SIRE lesa eed BIS EAG ete eee
STA tsb Ed Da

Welcome to Our Website

eM eM Cm el ead MM Lor oe ce SA a >Website Footer © 2024 aad ST Aw) s 3b ry) 4:47 PM 12.8KB/s d “ut! Ge): x veg HTMLT.. £ Qo: chatgpt.com >Website Footer © 2024 STAs | 3 ee Sd feeb ed Explanation: « Header: The header is created using a table row with one cell that spans across two columns (*colspan="2""), making it stretch across the entire width of the table. « Navigation: The navigation bar is placed in the first column of the second row, taking up 20% of the width ¢ Content: The main content area is placed in the second column of the second row, taking up the remaining 80% of the width. * Footer: The footer, like the header, spans across both columns, covering the entire width of the table. Why Tables Were Used: 1. Organized Layouts: Tables helped organize content into neat, structured sections. 2. Consistency Across Browsers: Tables rendered consistently across different web browsers, making it easier to control the layout Why Tables Are No Longer Used: 1. Accessibility Issues: Tables can make it harder for screen readers to navigate, causing issues for users with disabilities 2. Responsive Design: Tables are not flexible or responsive, making it difficult to create layouts that work well on different screen sizes (like mobile devices). 3. Complex Code: Using tables for layout results in more complex, harder-to-maintain code 4. SEO Problems: Search engines may find it harder to read and index content in table- based layouts. Modern Alternatives: Today, web designers use CSS Flexbox ¥ 4CSS Grid to create layouts. These tools are more nowerfil flevihle and recnnnsive makina it easier tn dasinn weh nanes that Innk eB @ ") 2. Unordered List (*
    *) 3. Definition List (**) 1. Ordered List (*
      *) An ordered list is used when the order of items matters, like a set of steps or a ranked list. Each item in an ordered list is numbered automatically. ¢ Tag: ‘
        * Items: “
      1. ~ (List Item) Example: eres
      2. First item
      3. Second item
      4. Third item
      This will render as. 1. First item 2. Second item 3. Third item Key Points: « The list items are automatically numbered. e You can customize the numbering style (e.g., Roman numerals, letters) using the type’ attribute (e.g., °
        ° for uppercase letters) 2. Unordered List (*
          ) t An unordered list is used when the order of items does not matter, like a list of things to eB (C) °) An unordered list is used when the order of items does not matter, like a list of things to pack or a list of features. Each item is marked with a bullet point * Tag: “
            e Items: *
          • * (List Item) Example:
          • Second item
          • Third item
          • This will render as ¢ First item e Second item * Third item Key Points: ¢ The list items are marked with bullet points by default. ¢ You can customize the bullet style using the “type” attribute (e.g., “
              ’ for circle bullets). 3. Definition List (*°) A definition list is used for listing terms and their corresponding definitions or descriptions. Unlike ordered or unordered lists, a definition list pairs terms with their descriptions * Tag: “
              ° (Definition List) © Term: °
              * (Definition Term) ¢ Description:
              * (Definition Description) Example: 4 be) CamScanner 4:51 PM 2.5KB/s 0 Bou x Vv 95 HTMLT.. chatgpt.com © lag: “
              (Definition List) « Term: ‘
              ’ (Definition Term) * Description: “
              * (Definition Description) Example:
              HTML
              Bieler me Cae lec ser ce Ek Ce Cele Bed R IAL
              Cascading Style Sheets, used to style web pages.<
              JavaScript
              ye ay ae ela ey CMT Moe hele RRS A OCT) C) This will render as ¢ HTML: Hypertext Markup Language, used to create web pages. * CSS: Cascading Style Sheets, used to style web pages. * JavaScript: A programming language used to add interactivity to web pages Key Points: * The ‘
              * tag defines the term, and the *
              * tag defines the description associated with the term. « You can have multiple “
              ’ elements for a single “
              Summary: ¢ Ordered List (‘
                *): Creates a numbered list where the order matters. * Unordered List (“
                  °): Creates a bulleted list where the order doesn't matter ¢ Definition List ("~): Pairs terms with their descriptions, often used for glossaries or lists of terms and definitions. be) CamScanner 5:00 PM 66.8KB/s d wrattll CE)! The position Property The position property specifies the type of positioning method used for an element. There are five different position values: * Static e relative * fixed e absolute * sticky Elements are then positioned using the top, bottom, left, and right properties. However, these properties will not work unless the position property is set first. They also work differently depending on the position value. position: static; HTML elements are positioned static by default. Static positioned elements are not affected by the top, bottom, left, and right properties. Anelement with position: static; isnot positione’ positione This
                  elementhas position: f = @ a SJ CamScanner 5:00 PM 28.1KB/s d) rat! Cs position: static; HTML elements are positioned static by default. Static positioned elements are not affected by the top, bottom, left, and right properties. Anelement with position: static; isnot positioned in any special way; it is always positioned according to the normal flow of the page: his
                  element has position: static; Here is the CSS that is used: Example div.static { position: static; border: 3px solid #73AD21; Try it Yourself » | This
                  element has position: f naciti a @ element has position: relative; Here is the CSS that is used: Example div.relative { position: relative; left: 30px; border: 3px solid #73AD21; Try it Yourself » | This
                  element has position: f a @ element has position: f a (OC) <4 CamScanner 5:00 PM 0.0KB/s 0° vat! COS) I position: absolute; Anelement with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed). However; if an absolute positioned element has no positioned ancestors, it uses the document body, and moves along with page scrolling. Note: Absolute positioned elements are removed from the normal flow, and can overlap elements. Here is a simple example: his
                  element has position: relative; his
                  element h position: absolute; Here is the CSS that is used: Exampo——_——_—_ a @ <4 SJ CamScanner 5:00 PM 0.4KB/s 0d al) CD Here is the CSS that is used: Example div.relative { position: relative; width: 400px; height: 200px; border: 3px solid #73AD21; div.absolute { position: absolute; top: 80px; right: 0; width: 200px; height: 100px; border: 3px solid #73AD21; Try it Yourself » position: sticky; Anelemet this
                  elementhas position: f positione a @ 4 CamScanner 5:00 PM 0.0KB/s 0° etl! CSD position: sticky; Anelement with position: sticky; is positioned based on the user's scroll position. A sticky element toggles between relative and fixed , depending on the scroll position. It is positioned relative until a given offset position is met in the viewport - then it "sticks" in place (like position:fixed). Try to scroll inside this frame to understand how sticky positioning works. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset Note: Internet Explorer does not support sticky positioning. Safari requires a -webkit- prefix (see example below). You must also specify at least one of top, right, bottom or left for sticky positioning to work. In this ed This
                  elementhas position: f a @ < SJ CamScanner 5:00 PM 2.1KB/s 0) al! CD one of top, right, bottom or left for sticky positioning to work. In this example, the sticky element sticks to the top of the page ( top: ©), when you reach its scroll position. Example div.sticky { position: -webkit-sticky; /* Safari */ position: sticky; top: 0; background-color: green; border: 2px solid #4CAF50; } Try it Yourself » Positioning Text In an Image How to pq2iti i | This
                  elementhas position: f a @ < CamScanner 5:08 PM 0.0KB/s 0° B “ul GD: — ChatGPT : X Vviooos Chast < A chatgpt.com orl w Qs What is Meta Tag in HTML? Write HTML meta tags code to solve following 1) To make your webpage Responsive. 2) Refresh document every 40seconds 3) Set an expiration date Stop the page from being listed. A Meta tag in HTML is an element used within the ‘* section of an HTML document. It provides metadata about the webpage, such as descriptions, keywords, author of the document, and more. These tags help search engines understand the content of the page, control the behavior of web browsers, and can also be used to make the page responsive or automatically refresh. Here is how you can achieve the specific requirements: 1) To Make Your Webpage Responsive To ensure that your webpage is responsive, you can use the following meta tag. This instructs the browser to control the page's dimensions and scaling 2) Refresh Document Every 40 Seconds To automatically refresh the webpage every 40 seconds, use the following meta tag: BT] 3) Set an Expiration Date and Stop the Page from Being Listed To set an expiration date for your page (after which it is considered stale) and to stop the page from being listed by search engines, you can use the following tags: + Expiration Date: * Stop Page from Being Listed (Noindex): eB © Your Webpage Title ea SOc, elm e ROT aii eg This code snippet will ensure your webpage is responsive, refreshes every 40 seconds, expires on the specified date, and is not indexed by search engines CamScanner 5:11PM 6.0KB/s 0° ee Create an HTML form to submit student data for Admission Upload pdf copy of mark sheet, passport size photo and address proof. ) create an HTML form for submitting student data for admission, including the upload a PDF copy of the mark sheet, passport-size photo, and address proof, you can use e following code: See Bes Buda) beatae eS SCM ce la Sed Date of Birth:< str S ce Te BS ET eC eee Besa Sst ths = sa
                  ra EDC ha we Tee >Female >Other

                  ca PSE Sead ed = “ juired>

                  >Phone Number ;
                  - me ; ed>

                  >Address:
                  >Upload PDF Mark Sheet :
                  >Upload Passport Size Photo:
                  >Upload Address Proof:
                  5:11PM 17.1KB/s dY Bul! G2: >

                  >

                  >

                  >

                  >

                  IDF Mark Sheet :
                  ar yeh } reese) nse) ed rt Size Photo:
                  e= = : \>

                  id Address Proof:
                  5:13 PM 0.0KB/s 0 ou x wv es HTMLM.. chatgpt.com See, Ulny TONS are GHUWCU; WIE tie passpurt pruw varraceeprany wage format, and the address proof can accept PDF, JPG, JPEG, or PNG files ‘his form collects the student's personal details, and necessary documents and allo hem to submit their application for admission. Write an HTML code to take birth date between 01-01-2020 to 31- 12-2020 ‘o create an HTML form that allows users to input a birth date between January 1, 2 ind December 31, 2020, you can use the ‘min* and ‘max* attributes of the ‘ ‘lement of type “date *. Here's how you can do it: Study Birth Date Input Form STAs [eed Bs olele ig Enter Your Birth Date
                  Saale ane ST An ha Bed 5:14PM 0.0KB/s 0° Bal GS) x Vv 25 HTMLM.. chatgpt.com write an HI ML code to take birtn Gate petween UI-U I-ZUZU to 31- 12-2020. ML form that allows users to input a birth date between January 1, 2020, $1, 2020, you can use the ‘min* and ‘max’ attributes of the ** ‘date*. Here's how you can do it: >

                  e"*: The input field is of type ‘date’, which provides a date picker in tat support it. )-01-01"": The earliest date that can be selected is January 1, 2020. )-12-31"": The latest date that can be selected is December 31, 2020. x @ < CamScanner 5:16 PM 0.0KB/s d° Bou x Vv 93 HTMLM. chatgpt.com Write an HTML & CSS code to create Horizontal and Vertical Menu ere’s how you can create both a horizontal and vertical menu using HTML and CSS. . Horizontal Menu Sinan Sie leed Ste] Horizontal and Vertical Menu Boal Le BS To] eg Horizontal Menu mrt - .
                • Home
                • PIB ESS) >Services PS Gere) f >About
                • Bulbs ie ete SMCS ab be = pS Sab ESS) >Home
                • About
                • Contact
                BIA tele i) 5:16 PM 1.2KB/s 0° = x vy o= HTML M... ra oO chatgpt.com Pa bere] >About
              1. Vertical Menu me = >
              2. Services
              3. PIB Ets] >About >Contact Explanation: Horizontal Menu: e *.horizontal-menu’: This class is applied to the unordered list (*
                  *), making the list items (*
                • *) appear in a row. The “float: left; * rule ensures that the list items align horizontally. * °li a°: This selector styles the links within the list items, making them block-level elements that fill the list items and allowing padding and background colors to be applied effectively. * *:hover ‘: Changes the background color when the user hovers over a menu item Vertical Menu: * *.vertical-menu": This class is applied to another unordered list, making the list items stack vertically. * ‘border-bottom’: Adds a dividing line between each menu item * ‘width: 200px; °: Sets the width of the vertical menu * *:hover ‘: Similar to the horizontal menu, changes the background color on hover. Both menus can be customized further by changing colors, fonts, padding, and other properties be) CamScanner 5:19PM 4.7KB/s d’ © “all G2) x Vv o— HIMLM... < - chatgpt.com What is CSS Box Model? Write CSS code to implement following output. 1) Make an ordered list with red border, padding and font size 20. 2) Use flower.jpg as Background and repeat it. 3) Change background color of text box when focused. 4) Create a fixed position link at bottom with scrolling page. Give name of the link “#top”. 07 The CSS Box Model is a fundamental concept in web design that describes the rectangular boxes generated for elements in the document tree and how they interact with each other. It consists of four parts: 1. Content: The actual content of the element, where text and images appear. 2. Padding: The space between the content and the border. It clears an area around the content. 3. Border: The line that surrounds the padding (if any) and content. 4. Margin: The space outside the border, which separates the element from its neighboring elements. Here's the code to implement the requested output: 1) Make an Ordered List with Red Border, Padding, and Font Size 20 CamScanner 5:19 PM 3.2KB/s d’ © xX v9 HTIMLM. chatgpt.com Balad purer Bola Bae baal CSS Box Model Examples os 0b o) eg solid red; } B73 9) 2 Ag

                  Ordered List with Red Border, Padding, and Font Size 20px

                  Pep ied PRE Ge) Mb I 2 eee p36 2 Ga- eee ee pee oe eee
              2) Use ‘flower. jpg* as Background and Repeat It Sa) Salt ler BS 2 Site) ol CSS Box Model Examples S532 hod body { Tae [a= Lead } 1) CamScanner 5:19PM 11.1KB/sd ° x vy o= HTML M... ra oO chatgpt.com ( pa) -1 a }

              Background Image Repeating

              This page uses flower.jpg as a repeating background image.

              SSA slel eh ed 3) Change Background Color of Text Box When Focused Snag Bait (s bd CSS Box Model Examples Bn es@r ister le c-imel Meh ks mM) ae so) a Meal lee Bote ha po e173) sd pa ti) Sa el PS Seth = = STA cela utd BTA lel hed 4) Create a Fixed Position Link at the Bottom with Scrolling Page CamScanner 5:19 PM 0.0KB/s d’ © B nut x Vv 93 HTMLM. @ chatgpt.com BOE) T-38 a tu) lel De led SSRs = a eens Td STAC ald SUA Lele h i SAP ed 4) Create a Fixed Position Link at the Bottom with Scrolling Page Sana pale Lebd Bsa e) Biu-hg) so CSS Box Model Examples STALL Bede ct See kel at ae Loh ed

              Scroall down to see the fixed link at th >#top SA Leth ed Bodine Be Fynlanation: CamScanner 5:22 PM 0.2KB/s d) © atl 2 Ww Menuy Q QO Login schools i ee Gass) OTN toed a taal SQL CSS Pseudo-classes What are Pseudo-classes? A pseudo-class is used to define a special state of an element. For example, it can be used to: ¢ Style an element when a user mouses over it ¢ Style visited and unvisited links differently * Style an element when it gets focus Mouse Over Me Click Me To Get Focus CamScanner 5:22 PM 0.5KB/s d’ © wall) CL: 3 w Menuy QO Login schools = HTML CSS OPW Old eal SQL syntax The syntax of pseudo-classes: selector:pseudo-class { property: value; Anchor Pseudo-classes Links can be displayed in different ways: Example /* unvisited link */ a:link { color: #FFO000; /* visited Link x/ = (OC) <4 CamScanner 5:22 PM 0.0KB/s 0’ © wastl! CL): 3 Ww Menuy QO Login schools = ee CSS OPW Olde SQL Pseudo-classes and HTML Classes Pseudo-classes can be combined with HTML classes: When you hover over the link in the example, it will change color: Example a.highlight:hover { color: #ff0000; } Try it Yourself » Hover on

              An example of using the : hover pseudo-class awn a adie nlamant = @ < CamScanner 5:22 PM 3.1KB/s d’ © salt) CT): s Ww Menuy QO Login schools i eee css JAVASCRIPT SQL Hover on
              An example of using the : hover pseudo-class on a
              element: Example div:hover { background-color: blue; Try it Yourself » Simple Tooltip Hover Hover over a
              element to show a

              element (like a tooltip): Hover over me to show the

              element. Evamnla be) CamScanner 5:22 PM 0.0KB/s d’ © “al! CL): a w Menuy QO Login schools — HTML css JAVASCRIPT sie} Example p { display: none; background-color: yellow; padding: 20px; div:hover p { display: block; t Try it Yourself » CSS - The :first-child Pseudo- class The :first-child pseudo-class matches a specified element that is the first child of another element. Match the firet «n> alament a @ eT CamScanner 5:22 PM 0.0KB/s 0’ © wall) CET): S w Menuy QO Login schools = ee CSS OPW Ol sd ea SQL Match the first

              element In the following example, the selector matches any

              element that is the first child of any element: Example p:first-child { color: blue; } Try it Yourself » Match the first element in all

              elements In the following example, the selector matches the first element in all

              elements: = @ < CamScanner 5:23 PM 0.0KB/s d’ © vail) CET): S Ww Menuy QO Login schools — eee CSS JAVASCRIPT SQL Example p i:first=-child { color: blue; } NieAi eco ier tm Match all elements in all first child

              elements In the following example, the selector matches all elements in

              elements that are the first child of another element: Example prfirst-chitd i { color: blue; CamScanner 5:23 PM 0.2KB/s d’ © wall) CET): 2 Ww Menuy QO Login schools — ee CSS JAVASCRIPT SQL CSS - The :lang Pseudo-class The : Lang pseudo-class allows you to define special rules for different languages. In the example below, : Lang defines the quotation marks for elements with lang="no": Example

              Some text A quote in a paragraph Some text.

              = @ <

              You might also like