Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Guten Abend,

ich bin mir nicht sicher, ob ich die Aufgabe 1a und 1b richtig verstanden habe?

Aufgabe) Auf folgender Abbildung sehen Sie die Ausgabe einer PHP-Datei im Browser und deren Seitenquelltext.

 

 

 

 

 

 

Aufgabe 1.png

  • Autor

Teil a) Erstellen Sie eine PHP-Datei, in der mit einem einzigen echo-Befehl das gesamte HTML-Grundgerüst und die Ausgabe erzeugt wird, wie im oberen Teil der Abbildung zu sehen.

<?php

echo....;

?>

 Lösungsvorschlag: 

<!DOCTYPE html>

<html>

<head>

  <meta charset="UTF-8" />

  <title>Einsendeaufgabe 1</title>

</head>

<body>

<?php

echo "<h1>Alles mit Echo </h1> Diese HTML-Datei wurde aus einem einzigen echo-Befehl generiert." ;

?>

</body>

</html>

 

Teil b) Optimieren Sie die unter Teil a) erstellte echo-Anweisung in der Form, dass die Zeilenumbrüche und Einrückungen im Seitenquelltext erscheinen wie im unteren Teil der Abbildung.

Lösungsvorschlag:

<!DOCTYPE html>

<html>

<head>

  <meta charset="UTF-8" />

  <title>Einsendeaufgabe 1</title>

</head>

<body>

<?php

echo "<h1>Alles mit Echo </h1> <p>Diese HTML-Datei wurde aus einem einzigen echo-Befehl generiert.</p>" ;

?>

</body>

</html>

 

Danke!

C.K 

 

 

 

 

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.